I often find myself in the situation where I clone a repository, create a local branch and then have to do some initial setup work, which changes some files, before I can continue with the actual changes that I want to push later.
For example: I have cloned a Visual C++ project and created the local branch. Now I have to change the include and lib directories to correctly reference libboost. This changes the .vcxproj
file, but it is obviously a change that I don't want to send back to origin/master
. Only the subsequent changes are real changes.
I have considered using git update-index --assume-unchanged <file>
, but that will ignore the entire file and hence it rules out the possibility of other changes to the file that I'd want to commit.
What are solutions are there? Is git rebase
perhaps the solution?