fix clean checkout
parent
68327b5660
commit
e6540a6d14
5
builder
5
builder
|
@ -6,15 +6,14 @@ REPO="https://git.c3re.de/c3re/test-website.git"
|
||||||
refresh() {
|
refresh() {
|
||||||
cd
|
cd
|
||||||
|
|
||||||
test -d site/.git || {
|
test -d site/ || {
|
||||||
test -d site && rm -rf site
|
rm -rf site
|
||||||
git clone --recursive "$REPO" site
|
git clone --recursive "$REPO" site
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cd site
|
cd site
|
||||||
git pull
|
git pull
|
||||||
# iterate over all branches and checkout that branch
|
|
||||||
for branch in $(git branch -a | grep remotes | grep -v HEAD); do
|
for branch in $(git branch -a | grep remotes | grep -v HEAD); do
|
||||||
branch=${branch#remotes/origin/}
|
branch=${branch#remotes/origin/}
|
||||||
git checkout "$branch"
|
git checkout "$branch"
|
||||||
|
|
Reference in New Issue