4 ms·
I know you said GUI, but this single-line git alias that goes in ~/.gitconfig changed my life and I don't look for a git GUI anymore: [alias] l = log --da
by yebyen 7y ago
I know you said GUI, but this single-line git alias that goes in ~/.gitconfig changed my life and I don't look for a git GUI anymore:
[alias]
l = log --date-order --date=iso --graph --full-history --all --pretty=format:'%x08%x09%C(red)%h %C(cyan)%ad%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08 %C(bold blue)%aN%C(reset)%C(bold yellow)%d %C(reset)%s'
Next, go to one of your git project directories and type "git l"
If you don't want to learn rebasing and other Git fun, I'm not sure how much this will help you, but for me it's invaluable when it comes to identifying the base of my branch and where I would like to transplant it to.
Along with the basic "git pull --rebase" I also frequently use "git rebase --onto" and "git pull --rebase=merges" or "git rebase --rebase-merges" in my projects in order to manage branches that were created in an order other than what I want them to merge in. This keeps the history nice and linear, so I can avoid having any commits with two or more parent commits.
I don't find there's much else I would want to have a GUI to help with. But without a git graph that I can scroll freely, I feel as if I could not do my day-to-day work with such ease. This makes the most usable git graph with colorized edges and may be all you need. That, along with a nice PS1 setting so you get some branch status information right in your terminal status line without asking for it every time.
- viraptor 7y agoIf you liked that alias, check out tig, which is a very simple TUI for git. It gives you a browsable graph, and other nice things. It also does "tig blame" with going back to revision before a specific line with a single key shortcut.
- dcuthbertson 7y agoHow on earth did you create that format string? That alias generates really nice output!
- yebyen 7y agoIt appears to have come from this guy, here is the original gist: https://gist.github.com/msroot/6206676 https://gist.github.com/msroot/6206676
- reddotr 7y agoFinally ended with such a modification: [alias] glog = log --date-order --graph --all --date=short --pretty=format:"%x09%C(auto)%h %C(cyan)%ad %C(green)%<(12,trunc)%aN %C(reset)%<(50,trunc)%s %C(auto)%d"