Last active
August 2, 2018 15:58
-
-
Save pocheptsov/632cb08c114703bf071a 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
[user] | |
email = [email]@gmail.com | |
name = slava pocheptsov | |
[push] | |
default = simple | |
[core] | |
symlinks = false | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
interactive = true | |
[pack] | |
packSizeLimit = 2g | |
[help] | |
format = html | |
[diff "astextplain"] | |
textconv = astextplain | |
[rebase] | |
autosquash = true | |
[alias] | |
br = branch | |
# Get the current branch name (not so useful in itself, but used in other aliases) | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
brd = "!git branch -D $1 && git push origin :$1" | |
ci = commit | |
cia = !git add . && git commit --amend | |
cim = commit -A -m | |
co = checkout | |
cob = checkout -b | |
conflicts = !git ls-files -u | cut -f 2 | sort -u | |
cp = cherry-pick | |
# update current commit with all changed files without changing commit message | |
cup = !git add . && git commit --amend --no-edit | |
# reset local branch to remote HEAD | |
head = "!git fetch origin && git reset --hard origin/$(git branch-name)" | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative | |
log1 = !git log -n1 | |
log2 = !git log -n2 | |
log3 = !git log -n3 | |
log4 = !git log -n4 | |
log5 = !git log -n5 | |
log10 = !git log -n10 | |
# Push the current branch to the remote "origin", and set it to track the upstream branch | |
pub = "!git push -u origin $(git branch-name)" | |
p = pull | |
pushf = "!git push -f -u origin $(git branch-name)" | |
rb = rebase | |
rba = rebase --abort | |
rbc = rebase --continue | |
rbi = rebase --interactive HEAD | |
rbs = rebase --skip | |
rl = reflog | |
rp = remote prune | |
rs = remote show | |
rt = remote | |
ru = remote update | |
sb = show-branch | |
st = status | |
staged = diff --cached | |
undo = reset HEAD~1 --mixed | |
# Delete the remote version of the current branch | |
unpub = "!git push origin :$(git branch-name)" | |
up = "!git fetch origin && git rebase origin/${1:-neuro-master}" | |
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard | |
[pull] | |
rebase = true | |
[branch] | |
autosetuprebase = always | |
[filter "lfs"] | |
clean = git-lfs clean %f | |
smudge = git-lfs smudge %f | |
required = true | |
[credential] | |
helper = store |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment