Skip to content

Files

Latest commit

96c7a11 · May 5, 2025

History

History
263 lines (187 loc) · 7.17 KB

INSTALLATION.md

File metadata and controls

263 lines (187 loc) · 7.17 KB

Installation Guide

git-bug is distributed as a single binary, and is available for multiple platforms. Follow this document for instructions on how to install git-bug, and verify your installation.

Download a pre-compiled release binary

You can download the latest release binary from the release page, making sure to grab the appropriate binary for your system.

Next, rename the binary to git-bug, or git-bug.exe if you're using Windows.

Finally, place the binary in a directory that's in your PATH. That's it! You should now have git-bug available as a command line tool.

Linux

git-bug is available on a variety of Linux distributions, but how you install it depends on your distribution and package manager(s), as there is no standard package manager common to all distributions.

Arch Linux

git-bug is available in the Arch Linux User Repository (AUR).

Below, you'll find a non-exhaustive list of commands that use common third party tools for installing packages from the AUR.

Using aurutils
aur sync git-bug-bin && pacman -Syu git-bug-bin
Using yay
yay -S git-bug-bin

Nixpkgs

git-bug is available via nixpkgs.

Using home-manager
home.package = with pkgs; [
  git-bug
];
Using system configuration
environment.systemPackages = with pkgs; [
  git-bug
];
Using nix profile
nix profile install nixpkgs\#git-bug
Temporary installation with nix shell
nix shell nixpkgs\#git-bug

FreeBSD

git-bug is available on FreeBSD through a few different methods.

Using pkg
pkg install git-bug
Using the ports collection
make -C /usr/ports/devel/git-bug install clean

MacOS

git-bug is shipped via Homebrew:

brew install git-bug

Windows

git-bug is shipped via scoop:

scoop install git-bug

Build from source

You can also build git-bug from source, if you wish. You'll need the following dependencies:

  • git
  • go
  • make

Ensure that the go binary directory ($GOPATH/bin) is in your PATH. It is recommended to set this within your shell configuration file(s), such as ~/.zprofile or ~/.bashrc.

export PATH=$PATH:$(go env GOROOT)/bin:$(go env GOPATH)/bin

Note

The commands below assume you do not want to keep the repository on disk, and thus clones the repository to a new temporary directory and performs a lightweight clone in order to reduce network latency and data transfer.

As a result, the repository cloned during these steps will not contain the full history. If that is important to you, clone the repository using the method you prefer, check out your preferred revision, and run make install.

First, create a new repository on disk:

cd $(mktemp -d) && git init .

Next, set the remote to the upstream source:

git remote add origin git@github.com:git-bug/git-bug.git

Next, choose whether you want to build from a release tag, branch, or development head and expand the instructions below.

Build from a release tag

First, list all of the tags from the repository (we use sed in the command below to filter out some unnecessary visual noise):

git ls-remote origin refs/tags/\* | sed -e 's/refs\/tags\///'

You'll see output similar to:

c1a08111b603403d4ee0a78c1214f322fecaa3ca        0.1.0
d959acc29dcbc467790ae87389f9569bb830c8c6        0.2.0
ad59f77fd425b00ae4b8d7360a64dc3dc1c73bd0        0.3.0
...
Tip

The tags are in the right-most column. Old revisions up to and including 0.7.1 do not contain a v prefix, however, all revisions after, do.

Select the tag you wish to build, and fetch it using the command below. Be sure to replace REPLACE-ME with the tag you selected:

git fetch --no-tags --depth 1 origin +refs/tags/REPLACE-ME:refs/tags/REPLACE-ME
NOTE

The --no-tags flag might seem out of place, since we are fetching a tag, but it isn't -- the reason we use this is avoid fetching other tags, in case you have fetch.pruneTags enabled in your global configuration, which causes git to fetch all tags.

Next, check out the tag, replacing REPLACE-ME with the tag you selected:

git checkout REPLACE-ME

Finally, run the install target from //:Makefile:

make install

This will build git-bug and place it in your Go binary directory.

Build the unstable development HEAD

First, fetch the most recent commit for the default branch:

git fetch --no-tags --depth 1 origin HEAD:refs/remotes/origin/HEAD

Next, check out the tree you pulled:

git checkout origin/HEAD

Finally, run the install target from //:Makefile:

make install

This will build git-bug and place it in your Go binary directory.

Verify your installation

To verify that git-bug was installed correctly, you can run the following command. If you see output similar to what's shown below (and without any errors), you're all set!

git bug version

See more