Emacs has an optional undo-tree. You can cursor to each node, and hit return to go back in time, even along branches.
Is there something similar for git, which can be accessed within the Terminal (not Emacs). So, within a git project, I could type a command and it would show the tree. I could cursor around, going back in time or even switching to another branch, then hit return and it would checkout that particular commit's whole state.
The git branch command lets you create, list, rename, and delete branches. It doesn't let you switch between branches or put a forked history back together again. For this reason, git branch is tightly integrated with the git checkout and git merge commands.
As @NevikRehnel said, tig
is your friend.
tig --all
shows you your complete log in a tree form (as git log
's --graph
switch).
You move between commits with up and down keys, you see a git show
of the selected commit with Enter, and you can hit Shift + C for doing git cherry-pick
of that commit.
You can press H anytime to see help.
You can checkout branches, but you can too add custom bindings for doing git checkout
.
I think man tigrc
would be enough to understand how.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With