Skip to content

Instantly share code, notes, and snippets.

@dfang
Last active August 31, 2020 12:40
Show Gist options
  • Save dfang/a95e7e6035f3a313fd9ea581df412b7e to your computer and use it in GitHub Desktop.
Save dfang/a95e7e6035f3a313fd9ea581df412b7e to your computer and use it in GitHub Desktop.
git alias
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
git config --global alias.unstage 'reset HEAD --'
git config --global alias.last 'log -1 HEAD'

echo alias gl=\'git log --pretty=oneline\' >> ~/.bashrc
echo alias gs=\'git status\' >> ~/.bashrc
echo alias gd=\'git diff\' >> ~/.bashrc
echo alias gdc=\'git diff --cached\' >> ~/.bashrc
echo alias gb=\'git branch\' >> ~/.bashrc
echo alias gba=\'git branch -a\' >> ~/.bashrc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment