Pregunta

I want to create a branch in git that cannot be merged back into master but master can be merged into it. It needs to be a "separate" product but it will be 99% the same with some small tweaks. So new features in master need to be merged into the new feature branch but the new feature branch should never be able to merge back into master.

¿Fue útil?

Solución

you could fork

git init special-product
cd special-product
git remote add standard-product <URL>
git pull standard-product master
git remote rm stardard-product

now you have it local in another repo. you may need to create a new remote in an analog way to your standard-product repo

Otros consejos

I don't think it is a good idea to put the slightly modified application into a separate branch. If both applications are 99% the same I would encourage you to make the code more flexible. You could create a config file and let the application behaving differently based on that config file.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top