Top Related Projects
:cherry_blossom: A command-line fuzzy finder
simple terminal UI for git commands
GitHub’s official command line tool
It's Magit! A Git Porcelain inside Emacs.
Good-lookin' diffs. Actually… nah… The best-lookin' diffs. :tada:
A syntax-highlighting pager for git, diff, grep, and blame output
Quick Overview
Tig is a text-mode interface for Git, providing a user-friendly way to browse Git repositories and interact with Git commands. It offers a visual interface for viewing commit logs, diffs, and other Git-related information, making it easier to navigate and understand Git repositories in a terminal environment.
Pros
- Lightweight and fast, with minimal system requirements
- Intuitive keyboard-based navigation and commands
- Customizable interface and keybindings
- Integrates well with existing Git workflows
Cons
- Limited graphical representation compared to GUI Git clients
- Steeper learning curve for users unfamiliar with text-based interfaces
- Some advanced Git features may not be fully supported
- May require additional setup for certain integrations or customizations
Getting Started
To install Tig on various systems:
# macOS (using Homebrew)
brew install tig
# Ubuntu/Debian
sudo apt-get install tig
# Fedora
sudo dnf install tig
# Arch Linux
sudo pacman -S tig
To use Tig, navigate to a Git repository in your terminal and run:
tig
This will open the main view, showing the commit log. Use arrow keys to navigate, press 'Enter' to view commit details, and 'q' to quit. For more advanced usage, refer to the Tig manual by running man tig
in your terminal.
Competitor Comparisons
:cherry_blossom: A command-line fuzzy finder
Pros of fzf
- More versatile: Can be used for general-purpose fuzzy finding beyond Git
- Faster performance for large datasets
- Highly customizable with extensive options and keybindings
Cons of fzf
- Steeper learning curve due to more complex configuration options
- Requires additional setup for Git-specific functionality
- Less focused on Git-specific features compared to tig
Code Comparison
tig:
tig
tig status
tig log
fzf:
git log | fzf
git branch | fzf
find . | fzf
Summary
tig is a text-mode interface for Git, providing a specialized tool for navigating and interacting with Git repositories. It offers a more streamlined experience for Git-specific tasks out of the box.
fzf, on the other hand, is a general-purpose fuzzy finder that can be used with Git and many other command-line tools. It offers greater flexibility and performance but requires more setup for Git-specific use cases.
Both tools have their strengths, with tig being more focused on Git workflows and fzf offering broader applicability across various command-line tasks. The choice between them depends on specific needs and preferences for Git interaction and general command-line usage.
simple terminal UI for git commands
Pros of lazygit
- More user-friendly interface with interactive menus and keyboard shortcuts
- Supports staging individual lines or hunks of changes
- Offers built-in diff viewing and conflict resolution tools
Cons of lazygit
- Heavier resource usage due to its graphical nature
- Steeper learning curve for users familiar with traditional command-line Git
- May not be suitable for servers or environments without a graphical interface
Code comparison
lazygit:
func (gui *Gui) handleCommitConfirm() error {
message := gui.State.CommitMessage
if message == "" {
return gui.createErrorPanel(gui.Tr.NoCommitMessageErr)
}
return gui.GitCommand.Commit(message)
}
tig:
static enum status_code
prompt_commit(struct view *view)
{
char cmd[SIZEOF_STR];
const char *msg = read_prompt("Commit message: ");
if (!msg || !*msg)
return error("No commit message");
if (!argv_format(view->env, cmd, sizeof(cmd), "git commit -m %s", msg))
return error("Failed to format commit command");
return exec_git_command(view, cmd);
}
Both repositories provide Git interfaces, but lazygit offers a more modern, feature-rich experience at the cost of increased complexity. Tig, being a simpler, terminal-based tool, is lighter and more suitable for command-line purists or server environments.
GitHub’s official command line tool
Pros of cli
- Official GitHub CLI tool with broader GitHub ecosystem integration
- Supports more GitHub features like issues, pull requests, and releases
- Regular updates and active development from GitHub team
Cons of cli
- Larger footprint and more complex installation process
- Steeper learning curve for users familiar with simple git commands
- Requires authentication for most operations, even public repository actions
Code comparison
tig (text-based interface):
$ tig
cli (GitHub CLI):
$ gh repo view
$ gh issue list
$ gh pr create
Summary
tig is a lightweight, text-based interface for git, focusing on repository browsing and commit history visualization. It's fast, simple to use, and doesn't require authentication for basic operations.
cli, on the other hand, is a comprehensive GitHub command-line tool that integrates deeply with the GitHub platform. It offers a wider range of features beyond git operations, including issue management, pull request handling, and release creation. However, it comes with a larger footprint and requires authentication for most actions.
Choose tig for a quick, focused git browsing experience, or cli for broader GitHub ecosystem integration and advanced features.
It's Magit! A Git Porcelain inside Emacs.
Pros of Magit
- Deeply integrated with Emacs, offering a seamless Git workflow within the editor
- Provides a comprehensive set of Git operations and features, including interactive rebasing and stashing
- Offers powerful staging capabilities, allowing partial file staging and unstaging
Cons of Magit
- Steep learning curve for users not familiar with Emacs
- Limited usefulness outside of the Emacs ecosystem
- May be overkill for users who prefer a simpler, more focused Git interface
Code Comparison
Magit (Emacs Lisp):
(magit-status)
(magit-stage-file "file.txt")
(magit-commit-create)
Tig (C):
int main(int argc, char *argv[])
{
return tig_main(argc, argv);
}
Summary
Magit is a powerful Git interface deeply integrated with Emacs, offering comprehensive Git operations and advanced features. It's ideal for Emacs users who want a full-featured Git workflow within their editor. However, it has a steeper learning curve and is less useful outside of Emacs.
Tig, on the other hand, is a lightweight, terminal-based Git interface written in C. It's more focused on providing a simple and efficient way to browse Git repositories and perform basic operations. Tig is more accessible to users across different environments and editors but may lack some of the advanced features found in Magit.
Good-lookin' diffs. Actually… nah… The best-lookin' diffs. :tada:
Pros of diff-so-fancy
- Enhances Git diff output with improved color schemes and formatting
- Focuses specifically on improving diff readability
- Lightweight and easy to integrate into existing Git workflows
Cons of diff-so-fancy
- Limited to diff functionality, unlike tig's broader feature set
- Requires additional setup and configuration for optimal use
- May not be as customizable as tig for power users
Code comparison
diff-so-fancy:
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
git config --global color.ui true
tig:
tig
tig status
tig show
Additional notes
tig is a text-mode interface for Git that provides a comprehensive set of features for browsing and interacting with Git repositories. It offers a more extensive toolkit for Git operations, including commit browsing, blame view, and interactive staging.
diff-so-fancy, on the other hand, specializes in enhancing the readability of Git diffs by improving syntax highlighting, removing extraneous information, and presenting changes in a more human-friendly format.
While tig provides a full-featured Git interface, diff-so-fancy excels at its specific task of beautifying diffs, making it an excellent complement to existing Git workflows or other Git tools.
A syntax-highlighting pager for git, diff, grep, and blame output
Pros of Delta
- Offers syntax highlighting and side-by-side diffs, enhancing readability
- Supports various output formats and customizable themes
- Integrates well with Git and can be used as a pager for other tools
Cons of Delta
- Requires Rust installation and may have longer setup time
- Can be slower for very large diffs due to its advanced features
- Less comprehensive Git repository browsing capabilities
Code Comparison
Delta (configuration example):
[delta]
features = "side-by-side line-numbers decorations"
whitespace-error-style = "22 reverse"
Tig (configuration example):
set main-view = id date author commit-title:graph=yes,refs=yes
set blame-view = date:default author:email file-name:auto id:yes,color line-number:yes,interval=5 text
Both tools offer configuration options, but Delta focuses on diff presentation, while Tig provides a more comprehensive Git repository browser interface. Delta excels in visual diff representation, whereas Tig offers a broader range of Git-related functionalities in a terminal-based UI.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Tig: text-mode interface for Git
:docext: adoc
image:https://github.com/jonas/tig/workflows/Linux/badge.svg[Linux CI,link=https://github.com/jonas/tig/actions?query=workflow%3ALinux] image:https://github.com/jonas/tig/workflows/macOS/badge.svg[macOS CI,link=https://github.com/jonas/tig/actions?query=workflow%3AmacOS] image:https://ci.appveyor.com/api/projects/status/jxt1uf52o7r0a8r7/branch/master?svg=true[AppVeyor Build,link=https://ci.appveyor.com/project/fonseca/tig] image:https://badges.gitter.im/Join%20Chat.svg[Join Chat,link="https://gitter.im/jonas/tig?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge"]
What is Tig?
Tig is an ncurses-based text-mode interface for git. It functions mainly as a Git repository browser, but can also assist in staging changes for commit at chunk level and act as a pager for output from various Git commands.
Resources
- Homepage: https://jonas.github.io/tig/[]
- Manual: https://jonas.github.io/tig/doc/manual.html[]
- Tarballs: https://github.com/jonas/tig/releases[]
- Git URL: https://github.com/jonas/tig.git
- Gitter: https://gitter.im/jonas/tig[]
- Q&A: https://stackoverflow.com/questions/tagged/tig[]
Bugs and Feature Requests
Bugs and feature requests can be reported using the https://github.com/jonas/tig/issues[issue tracker] or by mail to either the Git mailing list or directly to the maintainer. Ensure that the word "tig" is in the subject. For other Tig related questions please use Stack Overflow: https://stackoverflow.com/questions/tagged/tig[].
Installation and News
Information on how to build and install Tig are found in link:INSTALL.{docext}[the installation instructions].
News about releases and latest features and bug fixes are found in link:NEWS.{docext}[the release notes].
Top Related Projects
:cherry_blossom: A command-line fuzzy finder
simple terminal UI for git commands
GitHub’s official command line tool
It's Magit! A Git Porcelain inside Emacs.
Good-lookin' diffs. Actually… nah… The best-lookin' diffs. :tada:
A syntax-highlighting pager for git, diff, grep, and blame output
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot