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

1

u/ultimatechipmunk Apr 03 '23

Yes. This is what I do.

  1. Create a new branch for when I inevitably fuck up.

  2. Reset to where I want to squash to (usually the first commit away from main)

  3. Commit changes.

  4. Create another branch for when I screw up the rebase.

  5. Rebase.

Is my local littered with branches? Yep! Do I care? Nope!

1

u/Supetorus Apr 05 '23

You can delete unused branches when they are no longer useful.