In a large project with many independent files, I have several local changes. Now I want to update to the latest upstream version, keeping my local changes. I already know that my local changes are completely distinct from any upstream changes.
I know I could do this:
git stash
git pull --rebase
git stash pop
I don't see any reason though to first stash the local changes and then restore them again. It is pretty easy for git to see that the upstream changes will not affect any local changes, so that the upstream changes could be applied directly. This would mean I'd only have to:
git pull --rebase
Did I just miss the relevant git command line options? The manual mentions the --autostash
option, but that's not what I want. I want the locally changed files to stay completely unmodified and untouched since their timestamps are relevant.