Add Tig to your Git toolbox

Jamie Wen
1 min readDec 5, 2021

--

A quick browse of your git history

I use VSCode for most common tasks

These days, I use VSCode more than any other CLI or GUI client…syncing, coding, linting, testing, committing…the majority of the work can be done in VSCode. It is easy to use without remembering complex git commands. You can get your job done with a few clicks.

I use Git CLI for advanced operations

Other than the most basic operations like git pull or git commit. I use Git CLI when I need to merge branches, revert commits, revert files, cherry-pick changes.

When I need to change the config, modify the user, add an alias or pipe git to other commands. e.g.,

Delete all branches except master using xargs

git checkout master; git branch | grep -v "master" | xargs git branch -D

Delete all branches except master using $()

git checkout master; git branch -D $(git branch)

I use Tig for a quick browse

Tig: text-mode interface for Git. https://jonas.github.io/tig

tig to browse commit history. Up/Down to navigate. Enter to select. q to quit.

Show status

tig status

Show commits for a single file

tig -- package.json

Show changes for a folder

tig -- doc

--

--

Jamie Wen
Jamie Wen

Written by Jamie Wen

Software Engineer | Technical Lead | Engineering Manager https://justlearning.club

No responses yet