this is how to keep local changes, pull, and restore local changes :
git stash push -m "Backup" git pull git stash pop