From 7a632e90262005d9cde0f3ad8a0664a1a8eb8f1d Mon Sep 17 00:00:00 2001 From: Jonhnny Weslley Date: Mon, 26 Dec 2011 11:39:12 -0300 Subject: [PATCH 1/2] remove git-promote use the `-u` option instead: git push -u origin branch_name --- Readme.md | 4 ---- bin/git-promote | 12 ------------ 2 files changed, 16 deletions(-) delete mode 100755 bin/git-promote diff --git a/Readme.md b/Readme.md index b456138..6b5b910 100644 --- a/Readme.md +++ b/Readme.md @@ -420,7 +420,3 @@ Set up a git repository (if one doesn't exist), add all files, and make an initi ## git-touch [filename] Call `touch` on the given file, and add it to the current index. One-step creation of new files. - -## git-promote - -Promotes a local topic branch to a remote tracking branch of the same name, by pushing and then setting up the `git config`. diff --git a/bin/git-promote b/bin/git-promote deleted file mode 100755 index 5007f8a..0000000 --- a/bin/git-promote +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -branch=$(git symbolic-ref -q HEAD | sed -e 's|^refs/heads/||') - -remote_branch=$(git branch -r | grep "origin/${branch}") -test -z "${remote_branch}" && ( git push origin "${branch}" ) - -origin=$(git config --get "branch.${branch}.remote") -test -z "${origin}" && ( git config --add "branch.${branch}.remote" origin ) - -merge=$(git config --get "branch.${branch}.merge") -test -z "${merge}" && ( git config --add "branch.${branch}.merge" "refs/heads/${branch}" ) From b4fe82ffb45f5bf3ca19f29f3154e70a1eb24e63 Mon Sep 17 00:00:00 2001 From: Jonhnny Weslley Date: Mon, 26 Dec 2011 11:42:28 -0300 Subject: [PATCH 2/2] track gh-pages branch --- bin/git-gh-pages | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/git-gh-pages b/bin/git-gh-pages index 40fda3f..0553455 100755 --- a/bin/git-gh-pages +++ b/bin/git-gh-pages @@ -7,6 +7,6 @@ git symbolic-ref HEAD refs/heads/gh-pages \ && echo 'My Page' > index.html \ && git add . \ && git commit -a -m 'Initial commit' \ - && git push origin gh-pages \ + && git push -u origin gh-pages \ && git fetch origin \ - && echo 'complete' \ No newline at end of file + && echo 'complete'