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
- Linux
- FreeBSD
- MacOS
- Windows
- Build from source
- 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 pacman
pacman -S git-bug
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 ];
Temporary installation with nix shell (flake)
nix shell nixpkgs#git-bug
Temporary installation with nix-shell (stable)
nix-shell -p 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:
gitnix
[!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.
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 ...
TipThe tags are in the right-most column. Old revisions up to and including
0.7.1do 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
NOTEThe
--no-tagsflag 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 havefetch.pruneTagsenabled in your global configuration, which causesgitto fetch all tags.
Next, check out the tag, replacing REPLACE-ME with the tag you
selected:
git checkout REPLACE-ME
Finally, run the build target from //:Makefile:
make build
This will build git-bug and place it at ./result/bin/git-bug.
Move this binary file to a location in your PATH.
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 build target from //:Makefile:
make build
This will build git-bug and place it at ./result/bin/git-bug.
Move this binary file to a location in your PATH.
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