Add new git aliases prefixed with "gg"
This commit is contained in:
parent
72ca23231c
commit
e6cf2adb83
42
zshrc
42
zshrc
|
@ -165,7 +165,41 @@ alias ci='screen -x ssh || screen -c ~/.screen/scr.ssh_ci'
|
|||
alias ta='tmux a || tmux'
|
||||
alias td='tmux detach'
|
||||
|
||||
## Git
|
||||
## Git aliases − Try to prefix with 'gg'{{{
|
||||
### Get status of the repo
|
||||
alias ggstatus='git status'
|
||||
### Download any new commits
|
||||
alias ggpull='git pull'
|
||||
### Show differences between changes and index
|
||||
alias ggdiff='git diff'
|
||||
### Show only words/characters differences
|
||||
alias ggwdiff='git diff --color-words=. --patience'
|
||||
### Add changes to index
|
||||
alias ggadd='git add'
|
||||
### Remove files from the index
|
||||
alias ggrm='git rm'
|
||||
### Move or rename file
|
||||
alias ggmv='git mv'
|
||||
### Cancel changes
|
||||
alias ggcheckout='git checkout --'
|
||||
### Commit changes
|
||||
alias ggco='git commit'
|
||||
alias ggcommit='git commit'
|
||||
### Amend changes
|
||||
alias ggamend='git commit --amend'
|
||||
### Update remote repository
|
||||
alias ggpush='git push'
|
||||
### Print lines matching a pattern
|
||||
alias gggrep='git grep --color -n -P'
|
||||
### Show commit logs
|
||||
alias gglog="git log --graph --full-history --all --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'"
|
||||
### Show last 20 commits with graph
|
||||
alias gglg="git --no-pager log --graph --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ar)%Creset' -20"
|
||||
### Show all commits with graph
|
||||
alias ggllg="git log --graph --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ar)%Creset'"
|
||||
### Display all commits/changes of a file
|
||||
alias ggchanges="git log --follow -p --"
|
||||
|
||||
# Télécharger et merge les maj
|
||||
alias gpull='git pull '
|
||||
# Appliquer les changements dans le dépôt
|
||||
|
@ -176,17 +210,13 @@ alias gco='git commit'
|
|||
alias gcom='commit '
|
||||
# Envoyer les changements au dépôt maitre
|
||||
alias gpush='git push origin master'
|
||||
# Supprimer un fichier du dépôt
|
||||
alias grm='git rm '
|
||||
# Déplacer/rennomer un fichier
|
||||
alias gmv='git mv '
|
||||
# Montrer l'état de la branche active
|
||||
alias gstatus='git status'
|
||||
# Recherche dans le dépôt en ajoutant le numéro de la ligne et de la couleur
|
||||
alias ggrep='git grep --color -n -P'
|
||||
# Voir les logs d'un dépôt git (à la manière de gitk, dans un terminal)
|
||||
alias glog="git log --graph --full-history --all --color --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'"
|
||||
|
||||
## }}}
|
||||
|
||||
# Lister les fichiers de configuration inutiles
|
||||
alias purge='grep-status -n -sPackage -FStatus config-files'
|
||||
|
|
Loading…
Reference in New Issue