• Mémo Git : Quelques alias utiles

  • Useful git aliases

Git config:

[alias]
    ba = branch --all
    co = checkout
    fap = fetch --all --prune
    ga = add
    gs = status
    last = log -1 HEAD
    lol = log --oneline -n
    oops = "!f(){ git add -p && git commit --amend --no-edit; };f"
    tree = log --all --decorate --oneline --graph --pretty=format:'%C(auto)%h%d (%ci) %cn :: %s'
    wip = "!f(){ git add -p && git commit -m wip; };f"

.bashrc:

alias gs='git status '
alias ga='git add '
alias gb='git branch '
alias gc='git commit'
alias gcam='git commit --amend'

GitFlow

start: flow feature start
publish: flow feature publish
track: flow feature track 

Lister les alias:

$ git config --list | grep alias

Ajouter un alias:

$ git config --global alias.<alias name> '<commands>'

Supprimer un alias:

$ git config --global --unset alias.<alias name>


15 mai 2020 13:57