Live data from Hacker News

Tig – Text-mode interface for Git

jonas.github.io

71–80 of 98 posts

Re: Tig – Text-mode interface for Git

#71
post #5

Tig is and has been my favorite utility for browsing git logs for years now. Thanks tig developers and contributors! It's handy to know that the arrow keys are used for browsing the log messages, while return followed by either pgup/pgdn or j/k are used for scrolling the contents of a log message. And it's easy to search logs with /. Tig is also theme-able. For instance with: curl -so ~/.tigrc ' https://raw.githubuse…

    curl -so ~/.tigrc 'https://raw.githubusercontent.com/cbertoldi/dotfiles/master/tigrc.symlink'

Re: Tig – Text-mode interface for Git

#72
post #12

Using it for years. Pretty good and it's even included in the latest versions of git for windows (if you can't use something else, as it was my case for a while)

Thanks, I was just trying to find out where to download Windows binaries, and had no idea I already had it!

Re: Tig – Text-mode interface for Git

#74
post #65

I'd like to just say that Tig has been deeply integrated into my terminal git workflow for so many years, it's one of the first things I install on any new system. I've found that practically all GUIs for git only serve to be a shell for the same commands you'd be quicker typing out in the first place, and their only unique value is a visual representation your branching and the ability to quickly stage/unstage chunk…

I'll have to try it and see how it compares to Magit. Magit is by far my favorite way to interact with git. I do work on a repo currently however that brings Magit to its knees performance-wise, so I'll have to see if Tig performs better with it.

Re: Tig – Text-mode interface for Git

#75
post #58

tig is great, it's my go-to git client on all my machines. Only since I use tig I understand how to commit hunks. It's super easy to split the changes of a file into different commits that make sense. With most other clients this is either cumbersome or not possible. So your forced to always commit all changes of a file in one commit. I guess it just really works great for my workflow and the way I think about my rep…

Out of curiosity what's wrong with git add -i? That's what I use to stage parts of a file.

`git add -i` is linear, you have to address files and chunks in order (there are workarounds for this, but they're clumsy). `git add -i` is a bit like using a typewriter, whereas `tig`, which lets you address files and chunks non-linearly, is like using a word processor by comparison. Edit to your hearts content.

Re: Tig – Text-mode interface for Git

#76

My favorite is lazygit: https://github.com/jesseduffield/lazygit It has better layouts and shortcuts. I used Magit before, but hated to install Emacs only for such a small feature set. Lazygit is perfect when you want to manipulate a git repo quickly, but very similarly to Magit.

Excited to try this. I work in this one massive repo that Magit just can't handle. Pulling up the Magit status window takes 15-25 seconds on a 2019 15" MBP with an 8-core i9. It's torture because I'm so used to Magit that I hate having to change my workflow for one repo. I hope lazygit is faster than Magit.

Re: Tig – Text-mode interface for Git

#77
post #45

Earlier quoted context omitted.

Interesting, thank you! I think I need go learn more about what "curses" means

"Curses" is a library for writing, well, TUIs[0]. I get that's a bit circular, so let me explain. With a normal CLI program, you essentially just output to STDOUT line by line. You type `git status`, and the git program basically does `print(status)`. Then you're back to your terminal and you type another command, git or otherwise. A "curses" program renders fundamentally different. It's much more like how video game…

Actually, curses uses two buffers and diffs them so that only the delta is sent „over the wire“. In graphics, everything is redrawn every frame usually.

Re: Tig – Text-mode interface for Git

#79

Earlier quoted context omitted.

Interesting, thank you! I think I need go learn more about what "curses" means

Curses is just a library for writing command line interfaces. Normally a CLI just deals with the text buffer pushing content and the user inputting textual commands, curses allows for a bit more control like with panes, dynamic areas and giving the user more control on how to input commands.

Curses is just a library for writing command line interfaces.

You mean text user interfaces, right?

Re: Tig – Text-mode interface for Git

#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.
Post reply on HN