Get Started
rapid-git provides shortcuts for often-used git commands which aim to make your daily git use more efficient by typing less.
rapid-git enables you to interact with files and branches using numbers (called indexes). Indexes represent the files that git status
or branches that git branch
prints on the screen. When interacting with files you may define ranges using the numbers and dots notation.
The concept behind rapid-git was introduced by Alexander Groß in his repository git_shizzle. In contrast to this repository, which uses shell, he implemented his project using Ruby. If you are interested, please have a look at his project too.
Prerequisites and installation
There are a few prerequisites worth mentioning:
-
If you use bash, then your bash version needs to be at least v4.0.0. Use the following command to verify it:
bash --version
-
If you use zsh, then be aware, that we tested the script with v5.0.2 and v5.1.1. Check yours using this command:
zsh --version
-
If you use Mac, make sure, that you have gnu-sed installed. The easiest way is to use homebrew to install it:
brew install gnu-sed --with-default-names
For more extensive instructions on how to install GNU commmand line tools on Mac, please refer to this blog post.
Let's install rapid-git:
-
Start with cloning this repository:
git clone https://github.com/rapid-git/rapid-git.git
-
Add rapid-git.sh to .bashrc or .zshrc:
source path/to/rapid-git.sh
Note for Windows users:There is a certain trick for Windows users, who wish to create files such as .bashrc via the Windows Explorer. When typing the file name, do it as follows without defining a file extension:.bashrc.
-
At this point rapid-git should already work, but you may also add
source path/to/alias.rapid-git.sh
to get some default aliases.