Check out branches by their pull (or merge) request ID
Don't waste time doing this:
- Switching to a browser
- Navigating to the version control service
- Finding the project
- Navigating to the the merge/pull request page
- Copying a long branch name and clobbering your clipboard
- Typing out an overly-verbose branch name
git req REQUEST_NUMBER to check out the corresponding branch.
- GitLab (both GitLab.com and self-hosted)
- Install git-req
- MacOS Homebrew
brew tap arusahni/git-req
brew install git-req
- Arch Linux AUR
yay -Sy git-req
- Ubuntu/Debian package
- Download the latest
*.deb file from the release page.
dpkg -i /path/to/file.deb
- Everyone else...
- Download the binary for your operating system from the release page. At this time, only Linux and macOS are officially supported. Builds for other platforms are available, but untested.
- Decompress the archive.
- Place the
git-req executable somewhere in your
- Linux: suggested location
- macOS: suggested location
/usr/local/bin/. This may not exist, so it'll need to be created with
mkdir -p /usr/local/bin.
- That's it! The first time you run
git req REQUEST_NUMBER, it will prompt you for your API credentials if necessary.
In addition to checking out requests by ID,
git-req also supports:
- Viewing open requests with
git req --list
- Targeting different remotes with
git req -u
- Generating shell completions
git req --completions
If you have questions, ask on GitHub, or on Twitter. Please file issues on the GitHub project.