Live data from Hacker News

Tig – Text-mode interface for Git

jonas.github.io

81–90 of 98 posts

Re: Tig – Text-mode interface for Git

#83
post #80
post #41

Tig is one of the most valuable hidden gems out there. I use it both for simple things like a good looking commit log (the default view), but like especially how I can navigate into an old commit, hit t (for tree), and navigate and peek into the files available in that specific commit, hit b (for blame) to view which commit changed a particular row etc. I like how all the different views play together into such usefu…

And also e (for edit) which, at least for me, opens vin for a quick change when needed.

It uses whatever git's core.editor option tells it to, and supports setting $GIT_EDITOR to override it. I rely on that from time to time instead of having to write a bunch of different aliases in to my tig config for different editors.

Re: Tig – Text-mode interface for Git

#84
post #47

I use tig every day! Love it! My one wish is that when you go to edit a file from the interface (by hitting e) is that it would keep you in the directory you're in rather than editing the file as if you're in git root. Linters and other things break when I edit files from the root directory in our mono repo

You can add your own binding for e or perhaps some other key:

    [tig "bind"]
    generic = e !script %(file)
With script containing something like:

    cd `dirname $1`
    vim `basename $1`
Although, if you're already a vim user using `set autochdir` is probably easier.

Re: Tig – Text-mode interface for Git

#85
post #69

As a longtime vim user it feels like if I actually wanted a TUI veneer over the git CLI I'm already quite familiar with, I'd prefer it be done within vim as an extension/plugin or something. Having some vim-like keybindings in non-vim tools is nice, but it's always a far cry from being vim . And personally I find it incredibly annoying when I'm in something vim-like enough to establish "I'm in vim" expectations and n…

fugitive + gv vim plugins

Re: Tig – Text-mode interface for Git

#88
Tig is so useful for Vimmer since some of key binds are the same with Vim. Also, it's easier to execute rebase, cherry pick or all of git's commands than plane git commands if you customize it. I have no idea why all people who are familiar with CLI don't use it.

Re: Tig – Text-mode interface for Git

#89
Does anyone here actually use tig to interact with Git repositories, rather than simply as a repository viewer?

I've been a user for 8 years, but I only use it for viewing. Editing a repository remains a task exclusively for the CLI (or, occasionally, with magit).

Re: Tig – Text-mode interface for Git

#90

text-mode interface for Git Based on the comments here saying they love Tig, I know I'm missing something, but: doesn't Git provide a text interface (the `git` command) to Git? I'm not trying to be obtuse; I genuinely don't know what Tig provides that Git doesn't already do, but would love to know!

tig is a curses program, it's an interactive terminal GUI (a TUI), as opposed to a CLI e.g. you can browse and interact with your log rather than dump it in a pager and need a separate terminal to dive into a commit or whatever. magit is a good alternative, it's not exactly a TUI because it works entirely inside emacs and uses emacs concepts, but it's entirely text-based.

magit is a good alternative, it's not exactly a TUI because it works entirely inside emacs

Emacs also has TUI (when running in the Linux terminal or run `emacs -nw') so magit should also has TUI (at least on GNU/Linux where I use Emacs on).

Post reply on HN