Brain Phrye

code cooking diy fiction personal photos politics reviews tools 


Git Text Tools

I’ve been looking at ways to view the commit graph in git in a terminal because FreeBSD doesn’t natively package the gitk tool. This is annoying because it’s a nice way to show new git users what’s happening when they do merges.

Coming from older VCS tools, merges are scary. They’re really not scary in git if you know what’s happening but if your experince with merges is subversion or, worse CVS, you’re going to get twitchy about a merge.

The post the other day was just a thing I use from time to time to quickly visualise what’s changed but I wondered if there might be others. When I first learned git I remembered there was a tool I looked at but wasn’t very mature called tig (because word play is built into unix systems). It wasn’t very useful then, but thought I’d see if it had changed.

Initially tig shows you a gitk style view of all the commits but you can switch to a tree view once you arrow down to a revision you want to inspect. It’s rather peppy and gives people a quick way to walk through history. The keybindings for it really aren’t intuitive to me though so I guess I still find it hard to use. That’s me though, might be useful to others. One thing I though would be nice would be to navigate to a file and have an option to check it out or diff it against the present. That might be doable, I just couldn’t see how with a quick skim of the man page.

I’d be curious if folks know of any other text mode git history browsers. Amusingly I note I’m not the only one currently curious about code archeology.