How to omit changes from merge?
I just started using git (git svn) and imported SVN repo.
What I'm trying to achieve:
I would like to have 2 branches where branch A would have a project, branch A_dev would have the same project, but with tweaked configuration that would allow me to test my code. So my development would ha开发者_开发技巧ppen in A_dev and then I would merge my changes to A (all but the configuration changes).
Is there a way I could have my configuration changes to A_dev ignored my further merges of this branch to A?
So far I tried using
git merge -s ours <rev> A_dev
where rev is revision where changes to configuration were committed to A_dev, which works fine until I run
git svn rebase
after which the configuration changes get applied to A.
Other than that what I could think of is to have configuration changes only in stash and apply each time I checkout A_dev, which is kind of annoying. Or maybe do it the other way around and develop on A and then merge to A_dev, test switch to A fix problem, which is also not quite it.
If your configuration is saved in an isolated file, you may ignore this file (those files). See ".gitignore" file in the documentation for details or for example this site
精彩评论