-
-
Save crcastle/1524814 to your computer and use it in GitHub Desktop.
Revisions
-
tessro revised this gist
Dec 23, 2011 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -14,7 +14,7 @@ # It's set to use macvim as the default editor, you can change that easily by # changing this line: EDITOR=${EDITOR:-"$HOME/bin/mvim --remote-silent"} COMMAND=diff REV=HEAD -
arnorhs revised this gist
Dec 22, 2011 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ # This script will open all files from a git diff or a git show in vim. # My bash skills are a bit primitive so this can probably be done more intelligently # Usage: # gitopen -- opens all added files that have changed since HEAD @@ -14,7 +14,7 @@ # It's set to use macvim as the default editor, you can change that easily by # changing this line: EDITOR="$HOME/bin/mvim --remote-silent" COMMAND=diff REV=HEAD -
arnorhs renamed this gist
Dec 22, 2011 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
arnorhs created this gist
Dec 22, 2011 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,36 @@ #!/bin/bash # This script will open all files from a git diff or a git show in vim. # My bash fu sucks, so this could probably be done more intelligently # Usage: # gitopen -- opens all added files that have changed since HEAD # gitopen diff HEAD -- these are the default parameters # gitopen diff master -- opens files that have changed from master # gitopen show -- opens files that were changed in the last revision (HEAD) # gitopen show HEAD -- default param, does the same # gitopen show 4b3ca34 -- opens a particular REV # It's set to use macvim as the default editor, you can change that easily by # changing this line: EDITOR="~/bin/mvim --remote-silent" COMMAND=diff REV=HEAD if [ $1 ]; then COMMAND=$1 fi if [ $2 ]; then REV=$2 fi if [ $COMMAND = "show" ]; then PARAM='--pretty=format: --name-only' else PARAM='--name-only' fi git $COMMAND $PARAM $REV | xargs $EDITOR