
Git? tig - stefans
http://blogs.atlassian.com/2013/05/git-tig/
======
kylec
There seems to be some confusion here in the comments. Atlassian did not make
tig, Jonas Fonseca (<https://github.com/jonas>) did. In some sense though, it
makes Atlassian even more awesome that they wrote a blog post about a piece of
software they didn't create.

~~~
abusch
Absolutely, all praise should go to Jonas for this great tool! I am merely a
happy user sharing my experience.

------
terhechte
Atlassian, ironically, are the vendors of one of the best Git Gui tools for
Mac OS X, 'SourceTree': <http://sourcetreeapp.com>

~~~
kawsper
I use Tower ( <http://www.git-tower.com/> ) and love is so much that I have
bought my own license. But I hit usability issues from time to time.

I will give SourceTree a try, it looks interesting.

~~~
ChrisClark
Tower really helped me when I first started using git. Eventually I would move
to the terminal, but still use Twoer for when I messed up or tried to do
something more advanced.

I wish there was something just like it for Linux, all the ones I've found to
try always have some strange UI, or something that just doesn't work quite
'right' in my mind.

------
wiremine
Looks cool! One little nitpick: "Vim to your Emacs"... Er, maybe Vim to your
Eclipse. I don't know if I'd put Emacs in the same camp as Firefox or (heaven
forbid) Outlook.

Also, here's the manual: <http://jonas.nitro.dk/tig/manual.html>

~~~
jaredmcateer
I'm pretty sure he's just trolling there.

~~~
wiremine
Yeah, that makes sense. It would have been a better troll/joke if he had said
xemacs. I was honestly suggesting a better comparison, not suggesting it was a
bad idea. ;-)

~~~
pseut
vim to your Sublime Text :)

------
cbsmith
Someone needs to check out magit... <https://github.com/magit/magit>

~~~
ocharles
Magit is fantastic. If you don't use emacs but instead use Vim, you should
check out fugitive (<https://github.com/tpope/vim-fugitive>)

~~~
deuteronimi
Fugitive is hugely useful and actually provides features above and beyond tig.

That said, tig has an innate simplicity that works for people who are not
native vim-ers.

I primarily use screen windows for different functionality. While I can
accomplish everything from vim-fugitive, I still maintain a "git" window
purely for mind-segmentation and window-SRP reasons.

Thus, tig may open up a completely new concept of active git interfacing.

That said, it is yet another keystroke set to remember (albeit a small
keyset).

------
leephillips
The description of the status display is almost exactly what happens when you
type ":Gstatus" while you are editing a file under a git repository in vim, if
you have the _fugitive_ plugin installed. If you use vim, you might be
interested in this - there is some extra smoothness you get when you don't
have to leave your editor.

~~~
tfinch
Yup, came here to second this recommendation. A lot of the benefits found in
tig can be found in fugitive. One feature of fugitive I use all the time is
Gdiff to allow quick and easy comparison of various versions of a file.
Nonetheless, the history view and other features of tig are worth checking
out.

[Edited for links] Fugitive: <https://github.com/tpope/vim-fugitive>

Some helpful screencasts can be found here between April and May 2011
<http://vimcasts.org/episodes/archive>

------
homosaur
Nice, Atlassian continues to make my job much much easier in regards to Git. I
love the work they've done on SourceTree, which was a promising and pretty app
but very unstable before they bought it. It was hard to use it for critical
work because it was crashing quite frequently. Now it's rock solid and I use
it almost every day. I do know most of the command line tools but I like using
a GUI because it makes my repo better when I have a visual overview of
everything that's going on. It helps me group commits in logical order and
I've reduced the amount of basically meaningless fixes and style commits
greatly.

I'd never even heard of Tig but I am already in love after about 5 minutes of
usage. I'm comfortable with the Git CL and if you toss Git log enough flags,
it gives you a very nice printout, but you can't actually DO anything there.
This is a nice solution when you're working on a remote server but I'd also
bet that if SourceTree is not open, I'm going to find myself more and more
dropping into Tig rather than using SourceTree.

~~~
108
You can thank Jonas for writing tig: <https://github.com/jonas>

Atlassian blogged about it.

------
dinduks
For those who want to stick to the CLI and have a beautiful history log, you
may be interested in these two aliases:
[https://github.com/Dinduks/dotfiles/blob/master/.gitconfig#L...](https://github.com/Dinduks/dotfiles/blob/master/.gitconfig#L14)

Otherwise, tig is neat. I personally won't have to do `git lga` + copy
commit's SHA1 + `git show COPIED_SHA1` anymore.

The thing it lacks imo, is more VI-style shortcuts (such as "gg" and "G"),
displaying the SHA1 of each commit, and a feature to copy the hash of a
specific commit.

~~~
micampe
I suggest you put a new section in your .gitconfig

    
    
      [pretty]
        whatever = "tformat:%Cred%h%Creset -%C(yellow)%d %Creset%s %Cgreen(%an %cr)%Creset"
    

and then:

    
    
      --pretty=whatever

------
npongratz
Author mentions tig is available for Homebrew, which is great. Happily it is
available for MacPorts, and installed successfully for me on OS X 10.6.8:

    
    
      port install tig
    

[https://trac.macports.org/browser/trunk/dports/devel/tig/Por...](https://trac.macports.org/browser/trunk/dports/devel/tig/Portfile)

~~~
josx
Slightly off-topic, but is there a particular reason you prefer MacPorts to
Homebrew?

~~~
johncoltrane
Let's do it the other way: I've used MacPorts since 2006 without a single
issue, what problems will I be able to fix by switching to Homebrew?

~~~
leviathan
I remember when I upgraded to Lion everything got messed up. I had to spend a
whole day mucking about trying to fix thing. I remember the only solution was
to get a list of everything installed, uninstall everything, reinstall the
latest version of MacPorts and then reinstall all the original packages.

~~~
raimue
Migration is still required to reinstall ports as the underlying system
libraries change on a major version upgrade of Mac OS X.

However, situation still improved a lot since then. If the licensing of the
port and all dependencies allow it, MacPorts now even offers pre-compiled
binary archives for Snow Leopard, Lion and Mountain Lion. Often you do not
even have to compile software yourself anymore.

------
daigoba66
Honest question: what is wrong with the built-in gitk and git-gui?

~~~
moreati
Most likely answer: they don't work in a text-only environment e.g. an ssh
session

~~~
cientifico
ssh -X is your friend. I used at least once per week

------
gpeal
Is there any reason SmartGit doesn't get more love? I've been using it for
over a year now and much prefer it over every other git client I've ever used
(and I've tried a lot) <http://www.syntevo.com/smartgithg/index.html>

~~~
sethrin
I haven't tried most of the alternatives mentioned on this page. I primarily
use: [a] the command line. [b] git gui, (occasionally) for reviewing commits.
[c] meld, for all merge and diff-related tasks. [d] gitk, pretty much only for
viewing the history of a specific file. [e] SmartGit, for cherry-picking and
anything more complicated than my memory can handle.

There are very few times that I would not prefer using a GUI, when the
alternative would be typing all or part of a hash. The hash is for machine
consumption, not human consumption: let the machine deal with it. To that
particular end, I have found SmartGit to be excellent, and would recommend it.

Re: complaints about GUI tools: Someone is going to have to tell me why you
would be using git via a remote ssh session instead of having a local copy. I
am sure there is a logical scenario for that.

------
desireco42
I am using tig all the time, really convenient, I share sentiment of the
author, command line is most convenient. I do use Vim and awesome Tim Pope
Fugitive for blame and such operations. I am glad this information is
publicized.

------
kleiba
_Or worse: they’re written in Tcl/Tk…_

What's wrong with that?

 _it is the mutt to your Outlook, the Vim to your Emacs, the w3m to your
Firefox._

Not sure I can follow?!

~~~
bstpierre
> What's wrong with [Tcl/Tk]?

Not speaking for the author, but Tcl/Tk apps tend to be ugly. I use gitk from
time to time, but it's ugly and has some usability problems.

> Not sure I can follow?!

Mutt is a terminal-based MUA. Where Outlook is a giant monstrosity of a mail
client, mutt is fast and tiny.

Vim is [can be] a terminal-based text editor. The claim here is that emacs is
big, ugly, and slow and vim is smaller & faster.

w3m is a terminal-based browser. In comparison, firefox is a slow, giant,
memory sucking graphical browser.

~~~
kleiba
_Vim is [can be] a terminal-based text editor. The claim here is that emacs is
big, ugly, and slow and vim is smaller & faster._

Ahem.

Not to start any flame wars, but Emacs can be run inside a terminal as well.
As a matter of fact, that's the only way I run it.

"Ugly" is a matter of opinion for sure, as beauty lies in the eye of the
beholder. Emacs can (and does) make use of terminal colors, fonts are freely
configurable. I can't think of anything else that would be relevant for a text
editor, except of course if by "ugly" you refer to its architecture, editing
model, or something like that, rather than its appearance. If not, Emacs 24
allows you to install your favorite color scheme (solarized, zenburn, dawn,
etc.) right through the built-in package manager.

Re: "fast" - Emacs does not show any perceivable lag in everyday use, and my
main computer these days is an old netbook. Still, Emacs feels fully reactive.
If you refer, however, to startup times, then you may not be aware of the
'emacsclient' feature, which is the way a lot of serious Emacs users run their
editor. You basically start an emacs daemon to which you then connect with
thin interface clients, but I don't even feel the need for it, possibly
because the usage model for Emacs is different from Vim: I usually open one
editor window on a dedicated virtual desktop that stays open all the time, and
where I live most of the time, while with Vim, people tend to quickly open a
couple of instances in parallel. (Maybe these patterns have established
themselves in the olden times where Vim clearly outpaced Emacs in terms of
startup times, i.e., on older machines, and before 'emacsclient'.)

But you're certainly right about "smaller". As I said, I'm using an old
netbook most of the time, but even on this limited machine, Emacs does not
take up considerable disk space. Times have changed, and disks have grown. As
for RAM, I've never noticed it, the hogs are usually others (I'm looking at
you, Firefox!).

Vim is nice and small that you can install it even on very limited disk space,
say on your stone-old mobile phone. (Enjoy using it there, too.) But that's
not a typical scenario any more, diskspace is not longer an issue in modern
computing, at least as long as we're talking about text editing..

I would still say that Vim has one great advantage over Emacs, namely that it
is pretty much ubiquitous. You can log in to pretty much any server, and you
can be quite sure that there's some variety of vi installed. That's really
great. But if that was something the author of the original post referred to
with his "analogy" is questionable.

That's why I wasn't sure I could follow :-)

~~~
bstpierre
:)

Long-time emacs user here ... I was trying to explain the context of the
quote. I used "The claim here" to avoid making the statement myself and simply
explain the comparison.

------
Newky
Have used it for over a year at this stage, and did not realize the full
potential until this article.

I have been using it as a direct replacement for git log, and its something
that gets installed on any system I work on for any length of time.

~~~
a3n
Any time I install git, I install tig immediately after.

------
deepak-kumar
Cool. Makes life easy. Accessing all info on command line is awesome.
History/Diff view is best thing about it. Thanks for sharing. I see myself
using it on daily basis.

------
human_error
I don't see why you can't direct link to the mode itself:
<http://jonas.nitro.dk/tig/>

~~~
stefans
Sometimes it's useful to showcase some features to make people aware of how
tools can be used.

I would consider this: <https://news.ycombinator.com/item?id=5667935> to be a
good example of why that can be useful, no?

------
rjzzleep
i too like the fact that the makers of sourcetree write about it.

I've been using tig since the very first version. I have tried to find
something similar for mercurial without luck. it's probably one of the main
reasons why i prefer git over mercurial (usability wise anyway)

------
kickingvegas
Going to try it out. As an emacs user though, hard to beat vc-next-action and
vc-dir.

[http://www.gnu.org/software/emacs/manual/html_node/emacs/Ver...](http://www.gnu.org/software/emacs/manual/html_node/emacs/Version-
Control.html#Version-Control)

------
girvo
Oh, I was looking for something like this today. Gitk is all well and good,
but I have a whole heap of commands all tied into a custom Menu for Komodo
Edit. I hope `tig' can work in it's output pane: it'll be a lifesaver if it
does!

------
btucker
If you're on a Mac with homebrew installed:

    
    
        $ brew install tig

------
pyxy
How to make tig absolutely monochrome? Didn't find an option, is the only way
to set EVERY area like `color area white black`?

It's just burning my eyes with blue and magenta colors :)

~~~
pyxy
Just FYI here's the config for monochrome but tig warns about `unknown color`
on lines 8, 49, 51.

<https://pastee.org/tyk54>

------
sobering
I love this. I'm a command line junkie, as I'm sure a lot of you are.

I showed it to my boss and he told me I should've been born 20 years earlier
(born in '91).

------
jetblackio
I have to say, this is really, really cool. I'm also a lover of the command
line. I'm excited to integrate this into my workflow.

------
lobster_johnson
Great tool. Note that on OS X, it seems the UI drawing is buggy if you use the
"ansi" terminal emulation. "xterm" works.

------
arc_of_descent
Great writeup. I just started using git a month back for a pretty huge code
base. tig will definitely help me out.

------
jokoon
I learned mercurial first, because it seemed much simpler.

I'd like to convert myself to git though.

------
thejosh
I find the latest git-cola to be quite nice.

------
ardiyu07
Seriously, who uses GUI nowadays?

------
pjmlp
Welcome to System V! :)

------
swaraj
Using tig all dayy

------
elmindreda
tig was the reason I moved from monotone to Git.

------
yahave
finally! this is great.

~~~
drorweiss
Probably beats egit

------
brendanobrien
find of the week.

------
joetech
"So, the best GUI for Git is a command-line based UI?" lol

