Skip to content

Instantly share code, notes, and snippets.

@ColinHarrington
Created January 18, 2012 17:37
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ColinHarrington/1634361 to your computer and use it in GitHub Desktop.
Save ColinHarrington/1634361 to your computer and use it in GitHub Desktop.
git aliases
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
lg = log -p
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
ls = ls-files
@tednaleid
Copy link

looks similar to mine, I added the color stuff below after watching the peepcode git advanced video last night. The serve alias is nice as it starts up a local server that others can pull from easily:

[alias]
  co = checkout
  ci = commit
  st = status --short
  br = branch
  hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
  # all branches
  histall = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short --all
  type = cat-file -t
  dump = cat-file -p
  serve = !git daemon --reuseaddr --verbose  --base-path=. --export-all ./.git
  l = log --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue[%an]%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
[color]
  diff = auto
  status = auto
  branch = auto
  ui = true

@ColinHarrington
Copy link
Author

Thanks Ted! serve makes a great alias!

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