Reputation: 996
Occasionally, I need to add a modification to my local copy of a git branch that I don't want to commit, such as a workaround for my computer that shouldn't be included in my team's repo. What I would like to do is, in effect, gitignore part of a committed file. There seem to be several possible methods:
.git/info/attributes
and filters to automatically patch in the change when I run git checkout
and automatically remove it when I run git add
. This method is automated but not simple: it makes my working tree always have uncommitted changes, which is frustrating.Is there another method, or a better way of using these methods?
Upvotes: 0
Views: 64