-
-
Save mijdavis2/09b6ff4e082faa3e3416d3e663084dd7 to your computer and use it in GitHub Desktop.
Revisions
-
mijdavis2 revised this gist
Jun 2, 2021 . 1 changed file with 4 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 @@ -8,10 +8,12 @@ # the output of rev-list in the following test will be empty if there # are no commits in master that aren't in the current branch git fetch if [ ! -z "$(git rev-list ..master)" ] then echo "abandoning commit" echo "please rebase from master and try again" echo " git fetch; git rebase origin/master" exit 1 fi -
jcromartie revised this gist
May 25, 2011 . 1 changed file with 4 additions and 3 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 @@ -1,4 +1,4 @@ #!/usr/bin/env bash # hook to enforce that current branch is up-to-date with latest # changes from master before committing @@ -8,9 +8,10 @@ # the output of rev-list in the following test will be empty if there # are no commits in master that aren't in the current branch if [ ! -z "$(git rev-list ..master)" ] then echo "abandoning commit" echo "please merge from master and try again" echo " git merge master" exit 1 fi -
jcromartie revised this gist
May 25, 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 @@ -10,7 +10,7 @@ if [ ! -z $(git rev-list ..master) ] then echo "abandoning commit... it looks like this branch is out of date" echo "please merge from master and try again" exit 1 fi -
jcromartie revised this gist
May 25, 2011 . 1 changed file with 0 additions 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 @@ -12,6 +12,5 @@ if [ ! -z $(git rev-list ..master) ] then echo "abandoning commit" echo "please merge from master and try again" exit 1 fi -
jcromartie created this gist
May 25, 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,17 @@ #!/bin/sh # hook to enforce that current branch is up-to-date with latest # changes from master before committing # put me in .git/hooks and make me executable # the output of rev-list in the following test will be empty if there # are no commits in master that aren't in the current branch if [ ! -z $(git rev-list ..master) ] then echo "abandoning commit" echo "please merge from master and try again" echo " git merge master" exit 1 fi