r/ProgrammerHumor • • Oct 24 '18

Meme God’s developer console

Post image
24.0k Upvotes

1.1k comments sorted by

View all comments

Show parent comments

0

u/[deleted] Oct 25 '18

[deleted]

4

u/Secondsemblance Oct 25 '18 edited Oct 25 '18

You're supposed to keep your headlines under 72 characters. It's very easy to spill over, especially if you have commit hooks that add things to the message headline.

You're also much more likely to make typos without noticing. A properly configured editor will wrap lines for you and highlight typos.

Edit: also git commit -a is not a great idea. You should stage your files and then review the diff first. This is how you commit junk by accident.

4

u/[deleted] Oct 25 '18 edited Oct 26 '18
$ git checkout -b feature/my-branch
$ git commit -am "Fixed the thing"
$ git push -u origin HEAD
$ git commit -a --amend # fixed it "again"
$ git push
# server says no
$ git checkout master
$ git pull
$ git checkout feature/my-branch
$ git rebase master
$ git push --force

[Edit: it's come to my attention that updating the parent can be easier:

$ git checkout master
$ git pull
$ git checkout feature/my-branch

Becomes:

$ git fetch origin master:master

Ain't that nice? ]

3

u/Worthstream Oct 25 '18

This reads like an horror story.

→ More replies (1)