Skip to content

Instantly share code, notes, and snippets.

@do-i
Created October 4, 2019 01:13
Show Gist options
  • Save do-i/5485bbbd65988d9399b9796ce541352b to your computer and use it in GitHub Desktop.
Save do-i/5485bbbd65988d9399b9796ce541352b to your computer and use it in GitHub Desktop.
Git Config
[user]
name = First Last
email = first.last@gmail.com
[core]
editor = vim
autocrlf = false
[push]
default = upstream
[merge]
defaultToUpstream = true
[color]
diff = auto
status = auto
branch = true
interactive = auto
ui = true
pager = true
[color "diff"]
new = green bold
whitespace = red reverse
meta = yellow bold
frag = magenta bold
old = red bold
[color "branch"]
current = green bold
local = green
remote = blue
[color "status"]
added = green
changed = yellow
untracked = cyan
[alias]
tree = log --graph --oneline --all
co = checkout
s = status
fam = !git fetch && git merge
last = show HEAD
unstage = reset HEAD --
incoming = !git fetch && git log --oneline ..@{u}
inc = !git fetch && git log --oneline ..@{u}
out = log --oneline @{u}..
mff = merge --ff-only
pff = pull --ff-only
patch = diff --full-index master
galog = log --all --decorate --graph --abbrev-commit --date=relative
l = log --all --decorate --graph --abbrev-commit --date=relative --name-status
logs = log --all --decorate --graph --abbrev-commit --date=relative --name-status
bs = "!f() { for k in $(git branch | sed s/^..//); do echo $(git log -1 --pretty=format:'%Cblue%ci %Cgreen%cr%Creset' ${k})\t${k}; done;}; f | sort ${1}"
bsr = "!f() { for k in $(git branch -r | grep -v '>' | sed s/^..//); do echo $(git log -1 --pretty=format:'%Cblue%ci %Cgreen%cr%Creset' ${k})\t${k}; done;}; echo 'Processing... wait about 10 sec...'; f | sort ${1}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment