Alias for 'git diff' #818

Merged
merged 2 commits into from Apr 24, 2013

6 participants

@jmacdonald

I use git diff on a regular basis before actually committing my changes, but there's no alias for this in the git plugin. I've added one that I think is suitable.

@markdrago

I'd love to see this in oh-my-zsh. I'm pretty tired of typing 'g diff'.

@cseeger

+1 here

@cschiewek

+10 from me. I use git diff as often as commit and push :)

@smancill smancill and 1 other commented on an outdated diff Jan 20, 2012
plugins/git/git.plugin.zsh
@@ -3,6 +3,8 @@ alias g='git'
compdef g=git
alias gst='git status'
compdef _git gst=git-status
+alias gd='git diff'
+compdef _git diff=git-diff

I think this line should be

compdef _git gd=git-diff

Good call, I don't know how I missed that; I'll fix that up now.

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

+1 - also I have gdc for "git diff --cached" in my local aliases

@robbyrussell robbyrussell merged commit b4578be into robbyrussell:master Apr 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment