Updating with local changes
suggest changeWhen local changes are present, the git pull
command aborts reporting :
error: Your local changes to the following files would be overwritten by merge
In order to update (like svn update
does i subversion), you can run :
git stash
git pull --rebase
git stash pop
You can create an alias for convenience:
git config --global alias.up '!git stash && git pull --rebase && git stash pop'
git config --global alias.up 'pull --rebase --autostash'
Next you can do :
git up
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents