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?
Comments
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 ...
1. Few people seem to know about the awesome -vv option for git branch.
Now try git logp in a repo.2. Here's a way to make git log more compact and informational.
Add the following to your ~/.gitconfig file:
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.
Vim users should definitely check tpope Fugitive plugin. Its latest evolution makes it even better.
I'm a big fan and happy paying customer of the SmartGit GUI client.
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.
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: