Customizable status line tool for multiple Git repos
Inspired by mgitstatus
- Manage the list of Git repos. (see
List Subcommand) - Show the status of managed Git repos. (see
Status Subcommand) - Execute aliases or shell commands on managed repos. (see
Run Subcommand)- Choose status filters to decide when to execute aliases or shell commands.
- Create aliases for frequently used commands. (see
Aliases Configuration)
- Filter repos by tags or by path pattern.
- Create new layouts. Choose and style status components, or create custom ones. (see
Layout Configuration)
# Find and add Git repos to the list starting at home directory
gitty list --scan-add ~
# Show the status of all managed repos
gitty
# Show help
gitty --help- gitty cli documentation can be found at gitty(1) or by using
man gitty - gitty configuration documentation can be found at gitty-config(5) or by using
man gitty-config
Gitty depends on Swift 6.2 or later. The information about how to install Swift can be found at https://www.swift.org/install
-
Clone and build
git clone https://github.com/andrsem/gitty.git ~/Downloads/gitty cd ~/Downloads/gitty swift build -c release
-
Install
sudo install .build/release/gitty /usr/local/bin/
-
Verify the installation
gitty --version
Installing Man Pages
-
Clone
git clone https://github.com/andrsem/gitty.git ~/Downloads/gitty cd ~/Downloads/gitty
-
Install
Install in default location: /usr/local/share/man
MANPATH=/usr/local/share/man sudo mkdir -p $MANPATH/man1 $MANPATH/man5 sudo install docs/man/gitty.1 $MANPATH/man1/ sudo install docs/man/gitty-config.5 $MANPATH/man5/
Installing Zsh Completions
If you have oh-my-zsh installed, you already have a directory of automatically loading completion scripts — .oh-my-zsh/completions. Copy your new completion script to that directory.
gitty --generate-completion-script zsh > ~/.oh-my-zsh/completions/_gittyYour completion script must have the following filename format:
_gitty
Without oh-my-zsh, you'll need to add a path for completion scripts to your function path and turn on completion script autoloading. First, add these lines to ~/.zshrc:
fpath=(~/.zsh/completion $fpath)
autoload -U compinit
compinitNext, create a directory at ~/.zsh/completion and copy the completion script to the new directory.
Installing Bash Completions
If you have bash-completion installed, you can just copy your new completion script to the /usr/local/etc/bash_completion.d directory.
gitty --generate-completion-script bash > /usr/local/etc/bash_completion.d/gitty.bashWithout bash-completion, you'll need to source the completion script directly. Copy it to a directory such as ~/.bash_completions/, and then add the following line to ~/.bash_profile or ~/.bashrc:
source ~/.bash_completions/gitty.bashInstalling Fish Completions
Copy the completion script to any path listed in the environment variable $fish_completion_path. For example, a typical location is ~/.config/fish/completions/gitty.fish.
gitty --generate-completion-script fish > ~/.config/fish/completions/gitty.fishAs of version 1.0, I'm considering the gitty project finished. The main focus after 1.0 would be fixing oversights on my part.
The long-term vision is to keep gitty simple, focused, and working like a dream. Reimplementing Git or implementing every Git feature is not a goal of this project. For advanced usages, consider using Git directly or something like amazing lazygit.