Skip to content

Instantly share code, notes, and snippets.

@MattesGroeger
Created November 25, 2011 11:29
Show Gist options
  • Save MattesGroeger/1393323 to your computer and use it in GitHub Desktop.
Save MattesGroeger/1393323 to your computer and use it in GitHub Desktop.
My .zshrc (part), gitconfig and diff_merge.sh for opening git diffs with DiffMerge app
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
plugins=(git osx brew svn)
# Normal aliases
alias gco='git co'
alias gci='git ci'
alias grb='git rb'
alias d='git diff --word-diff $@'
alias c='git commit -v $@'
alias s='git status -sb'
alias b='git branch -avv'
alias r='git svn rebase'
alias lg='git lg'
alias ls="ls -G"
alias ll='ls -hl'
alias la='ls -hal'
#!/bin/sh
EXCLUDES="swc fla swf"
URL=$1
EXT=${URL#*.}
for i in $EXCLUDES
do
if [ "$EXT" = "$i" ]; then
echo Skipped binary file $1
exit;
fi
done
echo Diff $1 $4
"/Applications/DiffMerge.app/Contents/MacOS/DiffMerge" -ro2 -t1="$1" -t2="$4" "$2" "$5"
[user]
name = Your Name
email = Your Mail
[color]
status = auto
branch = auto
diff = auto
[alias]
co = checkout
ci = commit
rb = rebase
lg = log --pretty=format:'%Cred%h%Creset%C(yellow)%d%Creset %s %Cgreen(%cr %an)%Creset' --abbrev-commit --date=relative
[diff]
external = diff_merge.sh
tool = diff_merge.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment