You can also do this interactively in a GUI with git-gui (unless you abhor TCL/TK), or in a console with tig.
I ssh into my dev machine (long story), so gitk + git-gui over sshfs is kind of cumbersome (things take noticeably longer). Moreover, switching between the console and a mouse driven GUI program isn’t very effective, even with a tiling manager.
Then I found tig and got used to it, and replaced gitk+git-gui with it. LOVE IT. I bound it to a key in vim, and I bring it up and close it as needed; it even uses most of the same keys as vim.
Since I have a screen window for each repo I work with, I don’t even need a different screen window for tig; it’s all in that window.
Everything just fits, and I can do git operations a lot faster than in bash (even knowing most history and completion shortcuts).
I HIGHLY recommend tig.
if (m_stockpile.m_sHitPoints <= 0)