Hacker News new | ask | show | jobs
by joshka 727 days ago
I'm generally addicted to the oh-my-zsh git plugin aliases[1]. Mostly gswm (git switch main), gswc (git switch --create), gpf (git push --force-with-lease), gcam (git commit all --message), gcan! (git commit all --amend --no-edit), grbm (git rebase main), grbc (git rebase --continue), grba (git rebase --abort)

gwip (git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign --message "--wip-- [skip ci]") is kinda useful when I want an actual commit before I change branches to do something else (I use this more often than stashing.

I also am a fan of git-brv from git extras (list branches verbose sorted by date - with the option to sort reverse so the last modified branch is the last one on your terminal)

And also git-trim - clean up merged branches

[1]: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git