I discovered and installed Git Extensions recently. I found it to be the best client so far after using the official Git gui, TortoiseGit, and SourceTree.
It's not, because it requires a ton of switches... If it would be something like git prettygraph it would be a basic functionality. I'm claiming chicken/egg here because a graph is more than useful.
#!/bin/bash
height=$(tput lines)
height=$((height / 3))
git la -$height
I tried to do that as an alias, as a function alias, and with the help of #git and /r/git, but nothing doing. It needs to be a script, apparently. I also have a git-lass version that changes the 3 to a 6. Basically I can do git la (list all) to get a full [possibly paged] output, or git las (list all short) to fire off the script and get the same thing truncated to roughly 1/3rd of my terminal height, or git lass (list all super short) for about 1/6th the height. I git las instantly and all day long. It's not exact, because branches and merges add in a fluctuating number of extra lines between the --oneline output, but it's good enough for me. I work on a variety of monitors, from zoomed-in laptop terminals with 30 lines, to my 24" vertical work monitor with well over 100 lines, and having these things in my dotfiles means I get nice behavior everywhere. I can see existing output, along with some commit oneliner info.
I also have git-lbs and git-lbss (b for 'branch'), but basically never use any of the git lb* aliases and scripts. I seem to always want to see everything. I've used git for 2 years to great effect, and I've never used one of the UIs. I find they tie my hands. Look into fugitive (for Vim) and magit (for Emacs), too. They make git ridiculously speedy to work with, and eliminate a lot of the need for the terminal uses, especially if you have a host of mappings (Vim), as I do:
That last one is based on this, which took a bit of finessing to get set up right, but has made ctags a completely automated thing for me for a long time now.
I also use git-gutter (Vim) constantly/passively to show me where my changes are, and to ]c and [c hop between them, and vim-gitv very occasionally to see the graph, but my ,gl alias (Vim, above), which prints out the output of git las for me, and ,gL, which does git la are usually more than enough to get an instant idea of what's going on with my branches and commits. The UIs are so much slower.
I use that one all the time. Every once in a while, though, I have adjacent but unrelated changes, and then I love being able to do it line-by-line with fugitive.
Use "e" (like "edit") when asked whether you want to stage a hunk and remove the new lines you don't want to stage and add the old lines that you don't want removed in that commit.
I like SourceTree on the Mac. The Windows version has some missing features and performance issues. On Windows my favorite is (not free but worth it) SmartGitHg. It's cross platform too.
I agree, for mundane operations, GitExtensions on Windows is great! For other stuff, dropping to the command line works as well. I don't know why some folks feel like they have to use only one or the other.
40
u/InvernessMoon Feb 06 '15
I discovered and installed Git Extensions recently. I found it to be the best client so far after using the official Git gui, TortoiseGit, and SourceTree.