My Personal Git Alias(es) I use for faster Git workflow

Setting Git Alias - How?

Git aliases are stored in the user's configuration in the ~/.gitconfig file. To add the alias, open the file and add/edit the [alias]  section.

Here is the list of all aliases I use day-to-day:

[alias]
    s = status
    co = checkout
    cob = checkout -b
    del = branch -D    
    br = branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
    save = !git add -A && git commit -m 'chore: savepoint'
    undo = reset HEAD~1 --mixed
    res = !git reset --hard
    done = !git push origin HEAD
    lg = !git log --pretty=format:\"%C(magenta)%h%Creset -%C(red)%d%Creset %s %C(dim green)(%cr) [%an]\" --abbrev-commit -30
	gbr = !git branch | grep -v master | xargs git branch -D
	ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
    cm = !git add -A && git commit -m 

Comments