Skip to content

Instantly share code, notes, and snippets.

@ashrithr
Last active December 20, 2015 00:59
Show Gist options
  • Save ashrithr/6046255 to your computer and use it in GitHub Desktop.
Save ashrithr/6046255 to your computer and use it in GitHub Desktop.
my git configuration with aliases
[user]
name = ashrithr
email = [email protected]
[color]
ui = auto
[credential]
helper = osxkeychain
[core]
excludesfile = /Users/ashrith/.gitignore_global
[difftool "sourcetree"]
cmd = /usr/local/bin/ksdiff -w \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[diff]
tool = Kaleidoscope
[difftool]
prompt = false
[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustExitCode = true
[mergetool]
prompt = false
keepBackup = false
[merge]
tool = Kaleidoscope
[alias]
# checkout
co = checkout
# ls
ls = log --pretty=format:\"%C(yellow)%h %C(blue)%ad%C(red)%d %C(reset)%s%C(green) [%cn]\" --decorate --date=short
# review changes before making a actual commit
ds = diff --staged
# short form of status and includes the branch details
st = status -sb
# did you forget to include a file with your last commit, or maybe you had one tweak you needed to make? Amend the staged changes to your last commit.
amend = commit --amend -C HEAD
# step back one commit and leave the changes from that commit staged. Now you can make additional changes, or recommit with a new message.
undo = reset --soft HEAD^
# review what you worked on for one day
standup = log --since '1 day ago' --oneline --author [email protected]
# complex git history
graph = log --graph --pretty=format':%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ar%Creset'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment