Improve handling of incoming changes for files marked as skip-worktree or assume-unchanged

Blake Campbell 9 months ago updated by Thomas Singer 9 months ago 1

See also: https://smartgit.userecho.com/communities/1/topics/422-automatic-override-of-files-marked-with-skip-worktree-during-pull

If I have some files marked as skip-worktree in my index and I want to pull down changes from the remote, I will often have to manually stash, pull, then re-apply my stash. It would be helpful if, instead of just failing with an error due to having skip-worktree files in the index, SmartGit would offer to attempt to automatically stash and re-apply the stash for you. Obviously if there are any conflicts that would have to be dealt with, but it would save a few clicks in most situations for me.

For context: I often find myself making changes to checked in configuration files for my local environment which I do not want to commit to the repo, so I will mark them as skip-worktree so that I don't run the risk of accidentally committing/pushing my changes to those files.

We suggest to (also) ask the Git community to improve the handling, e.g., using auto-stash.