Last active
December 21, 2015 02:09
-
-
Save curiouslychase/6232838 to your computer and use it in GitHub Desktop.
Requirements:
- Must have an exports jira='http://my.jira.url'
- must be on a branch that's not master
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $1 : remote name you want to diff against | |
function gdf () { | |
# get the current branch reference, cut with the delimiter / | |
# and grab the 3rd item in the list, copy to the pastebord, use the pbpaste | |
# as the diff name. | |
current_branch=`git symbolic-ref HEAD | cut -d"/" -f 3`; | |
git diff $1/master...HEAD --relative > ~/difflog/$current_branch.diff; | |
open "$jira/$current_branch"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment