git

Shortcuts for git commands


I would like to use shortcuts or aliases for git commands.

git diff
git status
git push 
git pull
git stash
git branch -a

How do I create shortcuts or aliases, is there a predefined list?


Solution

  • Put this into your .gitconfig

    [alias]
      st = status
      ci = commit
      br = branch
      co = checkout
    

    You can add as much as you want