r/ProgrammerHumor • • 17h ago

Meme gitPushOriginPlssssMakeNoMistakes

Post image
4.2k Upvotes

327 comments sorted by

View all comments

Show parent comment

7

u/Steinrikur 12h ago

My gitconfig is full of aliases for this kind of stuff, pusho for pushing a new branch to origin, deletebranch to delete it locally and remote, etc.

AI can write a commit message, but I'll be the one to push it.

3

u/dcheesi 12h ago

I'm as terse as possible, in the finest Unix fashion (fewer letters, fewer typos :)

gd, gdc, gdm, gdmc, gmm, gch, gcp, etc.

7

u/korneev123123 12h ago

git has it's own alias system. For example, I set alias co = checkout, and the best part is that bash completion understands this automatically, and suggests valid targets for checkout. Bash-level aliases won't do that.

1

u/JontesReddit 9h ago

git's new alias system supports any unicode character now by the way.

New "subsection" aliases will in future releases have more properties than command.

Subsection alises do not replace traditional aliases.

# Traditional alias
[alias]
  co = checkout
# New alias
[alias "co"]
  command = checkout

1

u/Tohaker 11h ago

You can set new branches to push to origin automatically with the push.autoSetupRemote config flag. Been part of my default setup for years.

1

u/the-liquidian 11h ago

I like pusho. I have been doing git push -u original HEAD like a chump

1

u/Jemnite 1h ago

I just set up rules. Also I don't let the AI write a commit message either because if I haven't sufficiently understood the changes enough to write the commit message I probably shouldn't commit it.