mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 15:36:21 -04:00
22 lines
548 B
Bash
Executable file
22 lines
548 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
echo 'setting up gh-pages'
|
|
echo '-------------------'
|
|
|
|
echo 'Tell me your github account username: '
|
|
read username
|
|
|
|
echo 'Now, tell me your repository name: '
|
|
read repository
|
|
|
|
git stash \
|
|
&& git checkout -b 'gh-pages' \
|
|
&& echo 'My Page' > index.html \
|
|
&& git add . \
|
|
&& git commit -a -m 'Initial commit' \
|
|
&& git remote add origin https://github.com/"$username"/"$repository".git \
|
|
&& git push -u origin gh-pages \
|
|
&& echo 'Complete' \
|
|
&& echo '-------------------' \
|
|
&& echo 'You can find your last changes in the stash!'
|