mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 13:40:45 +00:00
hugo: Always hard-reset to origin
after fetching
This commit is contained in:
parent
eda658f99d
commit
ddc2f50505
@ -22,7 +22,7 @@ export GIT_SSH_COMMAND
|
|||||||
|
|
||||||
if test -d "$GIT_DIR_NAME"; then
|
if test -d "$GIT_DIR_NAME"; then
|
||||||
cd "$GIT_DIR_NAME"
|
cd "$GIT_DIR_NAME"
|
||||||
git fetch origin "$GIT_BRANCH" && git reset --hard "$GIT_BRANCH"
|
git fetch origin "$GIT_BRANCH" && git reset --hard origin
|
||||||
else
|
else
|
||||||
git clone --depth 1 --branch "$GIT_BRANCH" -- "$GIT_REPO_URL" "$GIT_DIR_NAME"
|
git clone --depth 1 --branch "$GIT_BRANCH" -- "$GIT_REPO_URL" "$GIT_DIR_NAME"
|
||||||
cd "$GIT_DIR_NAME"
|
cd "$GIT_DIR_NAME"
|
||||||
|
Loading…
Reference in New Issue
Block a user