Updating with local changes

suggest change

When 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

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents