Last active
June 9, 2018 18:47
-
-
Save mandemeskel/f385949ebf9a493a6004a159b4132c03 to your computer and use it in GitHub Desktop.
Bash Script to Create Git Aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://git-scm.com/book/en/v2/Git-Basics-Git-Aliases | |
# 'git checkout' becomes 'git ch' | |
git config --global alias.ch checkout | |
git config --global alias.c commit | |
git config --global alias.s status | |
git config --global alias.sh stash | |
git config --global alias.b branch | |
git config --global alias.a add | |
git config --global alias.d diff | |
git config --global alias.pl pull | |
git config --global alias.ps push | |
# these two need to be run within a git repo to work | |
# git config —-global user.email GITHUB_USERNAME@users.noreply.github.com | |
# git config —-global user.name GITHUB_USERNAMAE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment