Last active
December 22, 2015 19:49
-
-
Save IchHabRecht/6522551 to your computer and use it in GitHub Desktop.
Revisions
-
IchHabRecht revised this gist
Feb 6, 2014 . 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 @@ -28,7 +28,7 @@ if `git branch --no-color | grep -q '^\*'`; then HEAD="" BRANCH=`git branch --no-color | grep '^\*' | grep -v 'no branch' | sed 's/^* //g' | sed 's/.*\///g' | grep '^[0-9][0-9.]'` if [ "$BRANCH" != "" ]; then DATE=`date +%Y-%m-%d` DIR=${PWD##*/} USER=`git config --get user.name` HEAD="$DATE [RELEASE] Release of $DIR $BRANCH ($USER)"$'\n' -
IchHabRecht revised this gist
Sep 13, 2013 . 1 changed file with 5 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 @@ -6,6 +6,9 @@ GITPATH="master..HEAD" while [ "$1" != "" ]; do case $1 in -c ) GITPATH="" ;; -w ) WRITE=true ;; @@ -51,8 +54,9 @@ if `git branch --no-color | grep -q '^\*'`; then fi # USAGE # git write-changelog [-c] [-w] [-f <filename>] [<path>] # git write-changelog [-w] [-f ChangeLog] [master..HEAD] # -c: Write log for whole changes # -w: Write log to file # -f <filename>: Name of changelog file # path: path for git log -
IchHabRecht revised this gist
Sep 11, 2013 . 1 changed file with 58 additions and 60 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,60 +1,58 @@ #!/bin/sh WRITE=false FILE="ChangeLog" GITPATH="master..HEAD" while [ "$1" != "" ]; do case $1 in -w ) WRITE=true ;; -f ) shift FILE="$1" ;; * ) GITPATH="$1" ;; esac shift done if `git branch --no-color | grep -q '^\*'`; then OUTPUT="" HEAD="" BRANCH=`git branch --no-color | grep '^\*' | grep -v 'no branch' | sed 's/^* //g' | sed 's/.*\///g' | grep '^[0-9][0-9.]'` if [ "$BRANCH" != "" ]; then DATE=`date -I` DIR=${PWD##*/} USER=`git config --get user.name` HEAD="$DATE [RELEASE] Release of $DIR $BRANCH ($USER)"$'\n' fi LOG=`git log --pretty=format:"%ad %h %s (%an)" --date=short --no-merges $GITPATH` if [ "$LOG" != "" ]; then OUTPUT=$HEAD$LOG$'\n'$'\n'; fi if [ -f $FILE ]; then OUTPUT=$OUTPUT"`cat $FILE`" fi if $WRITE; then echo "$OUTPUT" > $FILE OUTPUT=$OUTPUT$'\n'$'\n'"File $FILE was written." fi echo "$OUTPUT" fi # USAGE # git write-changelog [-w] [-f <filename>] [<path>] # git write-changelog [-w] [-f ChangeLog] [master..HEAD] # -w: Write log to file # -f <filename>: Name of changelog file # path: path for git log -
IchHabRecht created this gist
Sep 11, 2013 .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,60 @@ #!/bin/sh WRITE=false FILE="ChangeLog" GITPATH="master..HEAD" while [ "$1" != "" ]; do case $1 in -w ) WRITE=true ;; -f ) shift FILE="$1" ;; * ) GITPATH="$1" ;; esac shift done if `git branch --no-color | grep -q '^\*'`; then OUTPUT="" HEAD="" BRANCH=`git branch --no-color | grep '^\*' | grep -v 'no branch' | sed 's/^* //g' | sed 's/.*\///g' | grep '^[0-9][0-9.]'` if [ "$BRANCH" != "" ]; then DATE=`date -I` DIR=${PWD##*/} USER=`git config --get user.name` HEAD="$DATE [RELEASE] Release of $DIR $BRANCH ($USER)"$'\n' fi LOG=`git log --pretty=format:"%ad %h %s (%an)" --date=short --no-merges $GITPATH` if [ "$LOG" != "" ]; then OUTPUT=$HEAD$LOG$'\n'$'\n'; fi if [ -f $FILE ]; then OUTPUT=$OUTPUT"`cat $FILE`" fi if $WRITE; then echo "$OUTPUT" > $FILE OUTPUT=$OUTPUT$'\n'$'\n'"File $FILE was written." fi echo "$OUTPUT" fi # USAGE # git write-changelog [-w] [-f <filename>] [<path>] # git write-changelog [-w] [-f ChangeLog] [master..HEAD] # -w: Write log to file # -f <filename>: Name of changelog file # path: path for git log