Last active
August 28, 2020 14:26
-
-
Save salimkayabasi/9c1d7681e7e106f3d4ed to your computer and use it in GitHub Desktop.
This file contains 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
# credit: http://haacked.com/archive/2014/07/28/github-flow-aliases/ | |
[user] | |
email = salim.kayabasi@gmail.com | |
name = Salim KAYABASI | |
[core] | |
autocrlf = input | |
# editor = 'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin | |
editor = /Applications/Sublime\\ Text.app/Contents/SharedSupport/bin/subl -n -w | |
eol = lf | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
[svn] | |
followparent = true | |
[branch] | |
autosetuprebase = always | |
[log] | |
date = relative | |
[alias] | |
co = checkout | |
st = status -sb | |
ec = config --global -e | |
br = branch -vv | |
gr = grep -i | |
del = branch -D | |
rank = shortlog -sn --no-merges | |
ls = !git branch -r && git br | |
up = !git pull --rebase --prune $@ && git submodule update --init --recursive | |
cob = checkout origin/HEAD -b | |
task = "!f(){ git checkout origin/HEAD -b T${1} && git status; };f" | |
cm = !git add -A && git commit -m | |
save = !git add -A && git commit -m 'SAVEPOINT' | |
undo = reset HEAD~1 --mixed | |
amend = commit -a --amend | |
track = branch -u origin/HEAD | |
ren = branch -m | |
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard | |
bclean = "!f() { git branch --no-track --no-color --merged ${1-develop} | grep -v " ${1-develop}$" | xargs git branch -d; }; f" | |
bdone = "!f() { git checkout ${1-develop} && git up && git bclean ${1-develop}; }; f" | |
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short | |
cp = cherry-pick | |
lg = log --oneline | |
clog = "!f() { git log `git describe --tags --abbrev=0`..HEAD --pretty=format:' * %s (%an)' | grep -v 'Merge pull request';}; f" | |
# Commit changes to current head as amended commit | |
plus = commit --amend -a -C HEAD | |
# clean repository | |
crepo = filter-branch --tag-name-filter cat --index-filter 'git rm -r --cached --ignore-unmatch filename' --prune-empty -f -- --all | |
# tag version | |
addTag = "!f() { git co develop && git up && git tag -a v${1} -m "v${1}" && git tag;}; f" | |
delTag = "!f() { git tag -d v${1} && git push origin :refs/tags/v${1} && git tag;}; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment