git pull with uncommitted files


Suppose for whatever reason you need to pull in changes from a remote repository and you have uncommitted files that you don’t want to commit. Git won’t let you do that if it needs to merge changes to one of your uncommitted files. Try this…

git stash

git pull

git stash pop