File: git-gh-pages

package info (click to toggle)
git-extras 7.4.0-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 2,120 kB
  • sloc: sh: 4,312; python: 994; makefile: 146
file content (21 lines) | stat: -rwxr-xr-x 554 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash

echo 'setting up gh-pages'
echo '-------------------'
 
echo 'Tell me your github account username: '
read -r username
 
echo 'Now, tell me your repository name: '
read -r 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!'