Git tools: tig etc

Saturday 23 February 2019This is close to six years old. Be careful.

Recently I’ve had a few chats with engineers where I mention a git helper thing, and they hadn’t heard of it. So maybe other people would like to hear about them too:

tig is a full-window terminal UI for git. It’s great for spelunking through a git repo, looking at branches, history, blames, and so on. For a quick overview of what it does, this old blog post from Atlassian describes it pretty well.

You should play with it to see all of its features. To be honest, I haven’t quite internalized how it displays new panes, but I still love it for its speedy compact presentation of just the information I want.

hub is a command-line tool for doing GitHub things that are not pure git, or for supplying helpful GitHub-centric defaults. For example, cloning a repo with “hub clone username/repo”, or opening a pull request for the current branch with “hub pr”. It can do a ton of stuff. If you use a lot of GitHub features, but like the command line, you should definitely give it a try.

A global .gitignore file is like the .gitignore file in your repos: it specifies files that should never be committed to git. But instead of being part of a specific repo, this one is global to all of your repos on your machine. This is great for IDE-specific files, or data files for your own quirky tools.

Do you have other good helpers to recommend?

» 7 reactions

Comments

[gravatar]
Eric D Hanchrow 7:24 PM on 23 Feb 2019
Well, "magit" is the best UI for anything I've ever seen. But it runs inside Emacs, and Emacs is so weird that I can't recommend learning it just to use magit. But if you've always meant to try out Emacs ...
[gravatar]
1. Few people seem to know about the awesome -vv option for git branch.

2. Here's a way to make git log more compact and informational.
Add the following to your ~/.gitconfig file:
[alias]
        logp = log --pretty=format:'%C(red)%h %C(blue)%<(16,mtrunc)%an %C(green)%<(21,trunc)%ci%x08%x08 %C(reset)%s %C(yellow)%D%C(reset)'
Now try git logp in a repo.
[gravatar]
Edison Gustavo Muenz 8:04 AM on 24 Feb 2019
I like to use git-cola to write commits.

It's a very simple user interface with support to staging parts of the files, ammending, loading previous commit messages.
[gravatar]
Godefroid Chapelle 11:50 AM on 24 Feb 2019
Vim users should definitely check tpope Fugitive plugin. Its latest evolution makes it even better.
[gravatar]
I'm a big fan and happy paying customer of the SmartGit GUI client.
[gravatar]
The latest useful git tip I can share is `includeIf`: https://git-scm.com/docs/git-config#_includes
With it you are able to make gitconfigs conditional.
I use it so it auto-switches between my working and personal email depending on a folder name.
[gravatar]
vimagit isn't quite Magit, but it's enormously changed how I commit, and very much for the better: https://github.com/jreybert/vimagit

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.