Merge pull request #61 from jweslley/feature/remove-git-promote

Remove git promote
This commit is contained in:
TJ Holowaychuk 2011-12-26 09:13:35 -08:00
commit 38e6b5e6ca
3 changed files with 2 additions and 18 deletions

View file

@ -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`.

View file

@ -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'
&& echo 'complete'

View file

@ -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}" )