Some pretty cool Git tools to save your sanity and your kids

2 charles_f 4 7/30/2025, 5:16:07 PM fev.al ↗

Comments (4)

MzHN · 21h ago
`git reparent origin/main -n 3` sounds a lot like `git rebase --onto origin/main HEAD~3` and `git move-branch from to` sounds like `git branch -f from to`.

I love backup branches as much as anyone but I'd also recommend getting used to `git reflog` or perhaps `git log --all --oneline --graph --reflog` if you're worried about losing commits.

There is one* footgun in git that you can't just reflog your way out of and it's stashes because they piggyback off of the reflog, so dropping stashes will also remove them from the reflog. In those cases you can still visualize them with `git fsck --connectivity-only | grep 'dangling commit' | awk '{print $3}' | xargs git log --oneline --graph --all --reflog`.

*(as long as you've committed your changes, if not then there are way more)

jetters324 · 1d ago
love these. GitKraken has changed my life honestly
charles_f · 23h ago
spam.
jetters1 · 1d ago
love these. GitKraken has changed my life honestly