4 ms·
git commit -a -m "Commit" && git push 90% of the time, all you need :)
by friedButter 9y ago
git commit -a -m "Commit" && git push
90% of the time, all you need :)
- zwischenzug 9y agoSure, but it's the 10% that hurts!
- jameshart 9y agoThe other 10% of the time: git commit -a -m "Commit" && git push -f
- saagarjha 9y agoForcing your coworkers do deal with your incompetence, I see.
- jameshart 9y agoSince the OP never mentioned a need to use 'git pull', I assume the 10% of the time it didn't work was when other people had gone and corrupted the repository by pushing their own commits. Clearly that's not something we want to have to deal with.
- ilammy 9y agoFixed this for you: git commit -a -m "Commit" && git push || ( git push --force; echo "Bob, my git is weird again, could you please help?" > /run/slack/dm/bob-the-local-git-expert ) Obviously, you do this from master.
- hnrodey 9y agoUntil you actually need git add . && git commit -m "message" && git push <remote> <branch>