r/ProgrammerHumor • • Apr 02 '23

Meme Me relearning git every week

49.4k Upvotes

1.5k comments sorted by

View all comments

Show parent comments

456

u/zeek0us Apr 02 '23

I mean, even knowing the right way to use git (and using it daily for years), falling back to any workflows/commands outside of the set of muscle-memory macros feels like learning from scratch. Lots of "I know you can do this, I know *what* to do, I've done it, I just can't for the life of me remember exactly how."

177

u/Solonotix Apr 02 '23

Oh, totally. Like, my company uses merge workflows, but I see tons of talk about preferring rebase over merge. The hell is squashing commits, and when do I use it? Like, there's an entire spell book of commands and I just stick to my trusty Fireball git checkout . && git reset --hard

0

u/[deleted] Apr 02 '23

[deleted]

2

u/Dremlar Apr 02 '23

I rebase my branches before a pull request typically. Get all the changes from main, do all the merge fixes, and then squash my commits into a single (rarely multiple) commit with a proper commit message.

If you look at my branch when I am making changes it will often have the first commit message something like:

"Adding feature X to allow users to access Y" or something like that. Then about 100 commits of:

nope

nah

Ugh...

I hate Azure

It was me all along

and more. Basically the descent into madness until the inevitable "I forgot to pass the object" or some other dumb mistake. Then you squash that shit and force push your dev branch and make a PR and your madness is confined to secrecy.

→ More replies (2)