From db43e1f6aad1dfcd4a6f2a49bf141cfe2cbdb76b Mon Sep 17 00:00:00 2001 From: Kenneth Reitz Date: Fri, 27 Aug 2010 23:27:35 -0400 Subject: [PATCH] Added the essential'fresh-branch' feature. Updated Readme.md accordingly. --- Readme.md | 7 +++++++ bin/git-fresh-branch | 6 ++++++ 2 files changed, 13 insertions(+) create mode 100755 bin/git-fresh-branch diff --git a/Readme.md b/Readme.md index c136a4b..19b9729 100644 --- a/Readme.md +++ b/Readme.md @@ -15,6 +15,7 @@ - git count - git delete-branch - git delete-tag + - git fresh-branch - git ignore - git release - git contrib @@ -164,6 +165,12 @@ Outputs a repo summary: $ git delete-tag 0.0.1 +## git fresh-branch <name> + + Creates empty local branch _name_. + + $ git fresh-branch docs + ## git-changelog Populates the file named matching _change|history -i_ with the commits diff --git a/bin/git-fresh-branch b/bin/git-fresh-branch new file mode 100755 index 0000000..9952e49 --- /dev/null +++ b/bin/git-fresh-branch @@ -0,0 +1,6 @@ +#!/bin/sh + +test -z $1 && echo "branch required." && exit 1 +git symbolic-ref HEAD refs/heads/$1 +rm .git/index +git clean -fdx \ No newline at end of file