KevCaz's Website

A few days ago, as I was having a look at the list of aliases I use with Zsh, I realized that there was a ton of aliases available that I did not created:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
$ alias
g=git
gCO='gCo $(gCl)'
gCT='gCt $(gCl)'
gCa='git add $(gCl)'
gCe='git mergetool $(gCl)'
gCl='git --no-pager diff --name-only --diff-filter=U'
gCo='git checkout --ours --'
gCt='git checkout --theirs --'
[...]
gws='git status --ignore-submodules=${_git_status_ignore_submodules} --short'
gwx='git rm -r'

I had two thoughts while I was examining those:

  1. they’re pretty cool 😄!
  2. how did I get them?

I quickly figured out that those come with Prezto — a great configuring framework for Zsh! Note that the full list is easy to find on the GitHub repository. For the record, below is a selection that I find the most useful for my personal use.

1
2
3
4
5
6
7
8
alias gr='git rebase'
alias gir='git reset'
alias gwx='git rm -r'
alias gwX='git rm -rf'
alias gp='git push'
alias gf='git fetch'
alias gcm='git commit --message'
alias gco='git checkout'

By the way, I decided to complement this set of aliases by adding one to my own list of alias that creates .gitignore file which ignores the .DS_Store files (MacOS most annoying files 😆) that some of my collaborators keep adding in the repositories we share…😱

1
alias gig='echo ".DS_Store" > .gitignore