+3

Automatic override of files marked with 'Skip Worktree' during Pull

pancomputationalist 7 years ago 0

I have several files in my repository which are modified automatically by a background process. I do not want to commit these changes, so I mark the files with 'Skip Worktree'. However, another git user does (and should) commit these files, so I sometimes have to merge them into my local branch.


When I do this, git warns me that "Your local changes to the following files would be overridden by checkout". So I have to remove "Skip Worktree", discard the changes, checkout, then toggle "Skip Worktree" again.


It would be great if there was some configuration that automatically discards my local changes to these files before a checkout (better yet: only if they are changed upstream).


By the way, SmartGit is absolutely fantastic. Best Git GUI I've used so far.