Skip to content

Instantly share code, notes, and snippets.

@wings27
Created December 14, 2016 07:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wings27/464ad8d27b92c63f9204ee2c56e37082 to your computer and use it in GitHub Desktop.
Save wings27/464ad8d27b92c63f9204ee2c56e37082 to your computer and use it in GitHub Desktop.
git config
[push]
default = simple
[alias]
aa = add --all
b = branch --verbose --all
bnm = branch --no-merged
ch = checkout
chd = checkout develop
chm = checkout master
chr = checkout release
co = commit --all --message
f = fetch --verbose
ff = flow feature
fff = flow feature finish
ffp = flow feature publish
ffr = flow feature rebase
lg = log --graph --pretty=oneline --abbrev-commit --decorate --date=relative
lg1 = log --graph --pretty=oneline --abbrev-commit --decorate --date=relative -n 1
lg10 = log --graph --pretty=oneline --abbrev-commit --decorate --date=relative -n 10
lg2 = log --graph --pretty=oneline --abbrev-commit --decorate --date=relative -n 2
lg3 = log --graph --pretty=oneline --abbrev-commit --decorate --date=relative -n 3
lg5 = log --graph --pretty=oneline --abbrev-commit --decorate --date=relative -n 5
md = merge develop
p = push --verbose
pa = push --verbose --all
pd = push origin +develop:develop
pdv = push origin +develop:develop -v
pm = push --verbose --mirror
rhu = reset --hard @{u}
rsl = reset --soft @~
s = status
ss = status --short --branch
su = submodule update
sv = status -v
u = pull --verbose
ua = pull --verbose --all
ub = "!sh -c \"if [ $# -eq 0 ]; then echo 'error: Please specify a branch.'; else git checkout $1 && git pull --verbose && git checkout - ; fi;\""
um = checkout master && git status
[core]
autocrlf = Input
safecrlf = warn
quotepath = false
editor = vi
[i18n]
fileencoding = utf-8
commitencoding = utf-8
[gui]
encoding = utf-8
[pull]
rebase = true
[branch]
autosetuprebase = always
@wings27
Copy link
Author

wings27 commented Dec 14, 2016

Alias Usage:

Use under linux terminal or git-bash on Windows.

alias.ub <branch> : Switch to <branch>, then pull, then switch back. e.g. (on branch master) git ub develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment