Is there such a thing as git pull --dry-run to see how stuff will be merged before it messes up my working tree?
git pull --dry-run
Right now I am doing:
git f
Since pulling implies merging, I'd go with running git merge --abort if your script detects there were any conflicts and merging failed.
git merge --abort