Created
September 17, 2014 10:20
-
-
Save pepicrft/8ef2376196d41f5e598b to your computer and use it in GitHub Desktop.
Git Aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [alias] | |
| co = checkout | |
| ci = commit | |
| st = status | |
| br = branch | |
| cached = diff --cached | |
| hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short | |
| type = cat-file -t | |
| dump = cat-file -p | |
| #clb = branch --merged | grep -v "\*" | xargs -n 1 git branch -d | |
| undo = reset --soft HEAD~1 | |
| show-patch = format-patch -1 --stdout | |
| sha = rev-parse HEAD | |
| origin = config --get remote.origin.url | |
| current = rev-parse --abbrev-ref HEAD | |
| out = !git log origin/$(git current).. | |
| incoming = !git log ..origin/$(git current) | |
| publish= !git push origin $(git current) | |
| id = !echo "git clone --recursive $(git origin) --branch $(git current)" | |
| recent = !git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/heads/ | grep -v develop | head -n 5 | |
| wip = !git add --all . && git commit -m 'WIP' | |
| root = !pwd | |
| back = checkout - | |
| changelog-public = "!f() { git commit --allow-empty -m \"* $1\"; }; f" | |
| changelog-intern = "!f() { git commit --allow-empty -m \"$ $1\"; }; f" | |
| changelog-task = "!f() { git commit --allow-empty -m \"$ #task-$1\"; }; f" | |
| schemeclean = checkout Redbooth.xcodeproj/xcshareddata/xcschemes/* | |
| ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat | |
| lnc = log --pretty=format:"%h\\ %s\\ [%cn]" | |
| lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short | |
| ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative | |
| le = log --oneline --decorate | |
| dl = "!git ll -1" | |
| ldlc = diff --cached HEAD^ | |
| f = "!git ls-files | grep -i" #Example git f trenches | |
| la = "!git config -l | grep alias | cut -c 7-" # List Aliases | |
| r = reset | |
| r1 = reset HEAD^ | |
| r2 = reset HEAD^^ | |
| rh = reset --hard | |
| rh1 = reset HEAD^ --hard | |
| rh2 = reset HEAD^^ --hard | |
| sl = stash list | |
| sa = stash apply | |
| ss = stash save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment