Skip to content

Commit 33c27d2

Browse files
committed
fix(complete.sh): fix bugs with master branch and upstream
complete.sh would fail if pollinating master branch. Also, it would leave skeleton as the upstream of the new master branch, leading me to accidentally push changes from new projects to the skeleton repo.
1 parent 29f139c commit 33c27d2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

complete.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
#!/usr/bin/env bash
22
set -e
33

4+
if [[ $(git symbolic-ref --short HEAD) != 'master' ]]; then
5+
git branch -D master
6+
git checkout -b master
7+
fi
8+
git branch --unset-upstream master
49
git remote rename origin skeleton
10+
git remote add origin $(node -p 'require("./package").repository.url')
511
rm complete.sh
612
git add --all .
713
git commit -n -m 'pollinate project'

0 commit comments

Comments
 (0)