Last active
April 19, 2021 09:31
-
-
Save dixudx/7d7edea35b4d91e1a2a8fbf41d0954fa to your computer and use it in GitHub Desktop.
Revisions
-
dixudx revised this gist
Apr 19, 2021 . No changes.There are no files selected for viewing
-
dixudx revised this gist
Apr 19, 2021 . 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 @@ -3,7 +3,7 @@ # usage: # run command # $ cd your-repo # $ curl -Ls https://gist.github.com/dixudx/7d7edea35b4d91e1a2a8fbf41d0954fa/raw/prepare-commit-msg -o .git/hooks/prepare-commit-msg # $ chmod +x .git/hooks/prepare-commit-msg NAME=$(git config user.name) -
dixudx renamed this gist
Apr 19, 2021 . 1 changed file with 1 addition and 0 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 @@ -4,6 +4,7 @@ # run command # $ cd your-repo # $ wget > .git/hooks/prepare-commit-msg # $ chmod +x .git/hooks/prepare-commit-msg NAME=$(git config user.name) EMAIL=$(git config user.email) -
dixudx renamed this gist
Apr 19, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
dixudx created this gist
Apr 19, 2021 .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,23 @@ #!/bin/sh # usage: # run command # $ cd your-repo # $ wget > .git/hooks/prepare-commit-msg NAME=$(git config user.name) EMAIL=$(git config user.email) if [ -z "$NAME" ]; then echo "empty git config user.name" exit 1 fi if [ -z "$EMAIL" ]; then echo "empty git config user.email" exit 1 fi git interpret-trailers --if-exists doNothing --trailer \ "Signed-off-by: $NAME <$EMAIL>" \ --in-place "$1"