I'm looking for a command(s) to git stash only the list of files that would be overwritten/conflicting when doing a git pull, all at once. I just want to accept all the remote changes and deal with all conflicts by stashing local.
I've only been discarding local changes that conflict or stashing all changes (I want to keep those that don't conflict), which isn't ideal.
Stop using git stash and instead use temporary commits.
By doing that there is nothing special handling, just straight forward, normal git commands:
In case of conflicts, use KDiff3 to resolve them.
The above is as simple as it gets. Alternatively if you want a bit more control (say
pullbrings in a lot of changes and you only want to deal with some of it at the beginning) you could work with two branches,somebranch(which is trackingorigin/somebranch) andsomebranch.myworkwhich is the unpublished work you are doing.Then you let
somebranchstrictly followorigin/somebranchand then rebasesomebranch.myworkon top of that. When you eventually want to push changes fromsomebranch.myworkyou simply (fast-forward) merge those changes intosomebranchand push.