Git constantly ignore changeset

I made changes to my git repository that I don't want to distribute back to anyone else. I want to save the changes to my local repository. That is, I want to pull my repo to integrate with the changes I made.

The ideal answer would somehow tell git that it should constantly ignore a specific set of changes whenever I issue a merge command. I would rather not use a cherry set that changes every time I merge.

Why?

If you are wondering why: I use git-tfs. Visual Studio has the bad habit of storing TFS bindings in solution and project files. I would like to remove these bindings so that VS stops complaining about incorrect bindings, but if I accidentally checked the modified files in TFS, this will break the TFS-VS integration for all members of my team still using TFS.

How?

Is there an easy way for me to instruct git to always ignore a specific set of changes when performing a merge?

+4
source share
1 answer

A quick thought: create a separate local branch on which you have commit these special local changes that you save independently. Then, when you exit the external repo, you can cherry-pick commit certain commits to your commits to get to the state you want - you could even create an alias for it.

You can also fork out the pulled out commits so that you can have both a β€œclean” version for clicking, and your version for doing the work and / or you can revert to commit containing your special offers before you click (along with your usual rebase processes). Obviously, you do not want to click on any branch that has local special settings.

+1
source

Source: https://habr.com/ru/post/1384359/


All Articles