Created
June 8, 2016 14:48
-
-
Save desyncr/6e7389fc07a2d6f9a831e4ec713cd61c to your computer and use it in GitHub Desktop.
.gitconfig with 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
# This is Git's per-user configuration file. | |
[user] | |
# Please adapt and uncomment the following lines: | |
name = Your name | |
email = Your email | |
[push] | |
default = simple | |
[core] | |
excludesfile = /path/to/your/.global_ignore | |
pager = less | |
[diff] | |
external = ext-diff | |
tool = icdiff # https://github.com/jeffkaufman/icdiff | |
[difftool "icdiff"] | |
cmd = icdiff $LOCAL $REMOTE | |
[alias] | |
co = checkout | |
st = status | |
unstage = reset HEAD -- | |
last = log -1 HEAD | |
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short | |
up = !git fetch --all && git pull | |
fu = reset --hard | |
ec = config --global -e | |
up = !git pull --rebase --prune $@ && git submodule update --init --recursive | |
cob = checkout -b | |
cm = !git add -A && git commit -m | |
save = !git add -A && git commit -m 'SAVEPOINT' | |
wip = !git add -u && git commit -m "WIP" | |
undo = reset HEAD~1 --mixed | |
amend = commit -a --amend | |
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard | |
bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs -r git branch -d; }; f" | |
bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f" | |
# http://haacked.com/archive/2014/07/28/github-flow-aliases/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment