Skip to content

Instantly share code, notes, and snippets.

@igorski89
Created June 20, 2012 12:40
Show Gist options
  • Save igorski89/2959702 to your computer and use it in GitHub Desktop.
Save igorski89/2959702 to your computer and use it in GitHub Desktop.
git confing
[alias]
st = status
ci = commit
co = checkout
di = diff
dc = diff --cached
amend = commit --amend
aa = add --all
ff = merge --ff-only
pullff = pull --ff-only
noff = merge --no-ff
fa = fetch --all
pom = push origin master
b = branch
ds = diff --stat=160,120
dh1 = diff HEAD~1
br = branch
# Divergence (commits we added and commits remote added)
div = divergence
# Goodness (summary of diff lines added/removed/total)
gn = goodness
gnc = goodness --cached
# Fancy logging.
# h = head
# hp = head with patch
# r = recent commits, only current branch
# ra = recent commits, all reachable refs
# l = all commits, only current branch
# la = all commits, all reachable refs
head = !git l -1
h = !git head
hp = "!source ~/.githelpers && show_git_head"
r = !git l -30
ra = !git r --all
l = "!source ~/.githelpers && pretty_git_log"
la = !git l --all
[core]
excludesfile = /Users/igorevsukov/.gitignore_global
editor = vim
quotepath = false
[color]
ui = true
[credential]
helper = osxkeychain
#!/bin/bash
HASH="%C(yellow)%h%C(reset)"
RELATIVE_TIME="%C(green)%ar%C(reset)"
AUTHOR="%C(bold blue)%an%C(reset)"
REFS="%C(red)%d%C(reset)"
SUBJECT="%s"
FORMAT="$HASH}$RELATIVE_TIME}$AUTHOR}$REFS $SUBJECT"
show_git_head() {
pretty_git_log -1
git show -p --pretty="tformat:"
}
pretty_git_log() {
git log --graph --pretty="tformat:${FORMAT}" $* |
# Line columns up based on } delimiter
column -s '}' -t |
# Page only if we need to
less -FXRS
}
@igorski89
Copy link
Author

aliases and fancy git logging

[Wed Jun 20 • 07:40:45] [~/Development/code/MTStatusBarOverlay] [master] ➤ git l -10
*   ec42b36  5 weeks ago   Matthias Tretter   (HEAD, origin/master, origin/HEAD, master) Merge pull request #53 from gekitz/master
|\  
| * f908a89  5 weeks ago   Georg Kitz         Fixes the wrong bar appearance when the app is in landscape only mode
|/  
*   75e499c  6 weeks ago   Matthias Tretter   Merge pull request #50 from jianfeng/master
|\  
| * c3acb6d  6 weeks ago   Jianfeng           fix bug for allow user interaction
|/  
*   b5d11dd  6 weeks ago   Matthias Tretter   Merge pull request #46 from dwarfland/master
|\  
| * a788d1d  2 months ago  marc hoffman       Overlay fades to black rather than clear, causing odd color flash when using gray status bar style — proper fix that keeps "black" style on working, as well.
| * ae46fd3  2 months ago  marc hoffman       Overlay fades to black rather than clear, causing odd color flash when using gray status bar style
|/  
* 50c4645    3 months ago  Matthias Tretter   Fixes problem with iOS 5.1 not showing finished/error - icons, closes #44
* ba05606    3 months ago  Matthias Tretter   Fixed history crash, closes #41
* ba1a332    7 months ago  Matthias Tretter   Fixed check for wrong selector before calling delegate

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