I’m using Git Extensions as git GUI.
While working on vs c# project I needed to keep many settings files.
I figured to create local braches for keeping them.
So now my workflow looks like:
- Make real changes
- Checkout from local settings branch
- Commit, push
- Checkout back to local settings branch
- Rebase local branch
It is working fine unless I have made changes in files I changed in local settings commit.
If I did checkout from local branch is aborting with conflict for this file.
I need to stash changes, checkout, apply stash, pop stash.
Is there better way for this?
All I need is to keep few changes in few files.
Why are you using branches in this way? Branches are meant to keep features separated until they are ready to be pulled back into a singular “master” branch. If your project has a bunch of settings files that are relevant to the project, than that’s fine and you can keep them in
master. If your settings are experimental, then you can copy them to another branch, but the entire project should be in that branch as well.Your workflow should be something like.
When you are ready to publish your changes out of your local repo, then you can
git pullgit pushEdit: Perhaps another workflow would be to develop the main project on
masterwith various settings changes on other branches, but pull in master periodically as it changes.git commit// when on master.git checkout debuggit merge master//pulls master into debuggit checkout masterIn this case, master is never changed and isn’t affected by changes in other branches, but the various branches can be kept up to date with master’s changes.