This is all made for MacOS and assumes you are running zsh as your shell.
-
Make sure you have a
src
directory in yourhome
mkdir -p $HOME/src
-
Clone the repository into
$HOME/src/git-custom-commands/
git clone [email protected]:finseth/git-custom-commands.git $HOME/src/git-custom-commands
-
Set execution rights on all files in the folder
sudo chmod -R 755 ${HOME}/src/git-custom-commands
-
Add the custom git comands to your path
If you're using a
.zshrc.local
file, you should add it there instead[[ -f ${HOME}/.zshrc ]] || touch ${HOME}/.zshrc echo 'export PATH="$HOME/src/git-custom-commands:$PATH"' >> $HOME/.zshrc
-
Source your profile to reload your path
source ${HOME}/.zshrc
-
Verify the custom commands are loaded
If this outputs
Hello World!
to stdout, the commands are loaded and available for usegit echo "Hello World!"