A friend asked me about an error he had while trying ‘git pull, it was saying that file X was not uptodate.
For git pull (actually for merge) you need to not have anything uncommited (either commit or reset). But he did not wanted to commit because he didn’t finished working neither reset because he would lose his work.
There is another way, git stash: Git stash saves your modifications away and gives you a clean working dir. Use ‘git stash <optional name>‘ to create a stash. With ‘git stash list‘ you can view your stashes, ‘git stash show <name>‘ to view a specific stash and ‘git stash apply <name>‘ to apply it.
In his case he needed to run:
git stash work
git pull
git apply work