What is the right way?
git add foo.js git commit foo.js -m \"commit\" git pull git push
Or
git pull git add foo.js git comm
pull = fetch + merge.
You need to commit what you have done before merging.
So pull after commit.