555
submitted 2 days ago by [email protected] to c/[email protected]

Git cheat sheets are a dime-a-dozen but I think this one is awfully concise for its scope.

  • Visually covers branching (WITH the commands -- rebasing the current branch can be confusing for the unfamiliar)
  • Covers reflog
  • Literally almost identical to how I use git (most sheets are either Too Much or Too Little)
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 11 points 2 days ago

The only time I see a rebase fail is due to a conflict. Which can be aborted with git rebase --abort no need for reflogs unless you really mess things up.

[-] [email protected] 4 points 1 day ago

I'll admit that in 10 years using git, I don't think I've ever used reflog once.

[-] [email protected] 3 points 1 day ago

It can be nice when you successfully do a rebase (after resolving conflicts), but change your mind about the resolution and want to redo it.

Doesn't come up that much, but it's been handy once or twice, for me. It's also just nice security: no matter how I edit commits, I can always go back if I need to.

[-] [email protected] 3 points 2 days ago

Maybe you resolved the conflict in the wrong way and want to restart after finishing the rebase.

[-] [email protected] 3 points 2 days ago

Not sure I would say that is a rebase failing - just you messing things up. Can happen with any merge. But yeah that is a place where reflog would be useful. But I dont see why it would be on the cheat sheet instead of a git rebase --abort or be rebase specific.

this post was submitted on 24 Sep 2024
555 points (99.3% liked)

Programming

17071 readers
414 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS