Skip to content

Instantly share code, notes, and snippets.

@hadisinaee
Last active March 24, 2018 12:20
Show Gist options
  • Save hadisinaee/162114cc95450ee370ca88b4ac16a8d3 to your computer and use it in GitHub Desktop.
Save hadisinaee/162114cc95450ee370ca88b4ac16a8d3 to your computer and use it in GitHub Desktop.
This gist shows my shortcuts to git. for those who use git for their daily life activities.
# git status, e.g: git st
git config --global alias.st status
# git status -s, e.g: git sts
git config --global alias.sts 'status -s'
# git commit, e.g: git ci
git config --global alias.ci commit
# git commit -m, e.g: git cim ""
git config --global alias.cim 'commit -m '
# git commit -am , e.g: git cia ""
git config --global alias.cia 'commit -am '
# check the last commit
git config --global alias.last 'log -1 HEAD'
# show logs in abbrev mode with one line
git config --global alias.last 'log --abbrev-commit --pretty=oneline'
# checkout to a branch
git config --global alias.co checkout
# unstage the changes
git config --global alias.unstage 'reset HEAD'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment