mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 05:30:45 +00:00
hugo: Clone with depth=1
, reset after fetch
This commit is contained in:
parent
b7ca813a40
commit
f2ab86f5bf
@ -22,9 +22,9 @@ export GIT_SSH_COMMAND
|
||||
|
||||
if test -d "$GIT_DIR_NAME"; then
|
||||
cd "$GIT_DIR_NAME"
|
||||
git fetch origin "$GIT_BRANCH"
|
||||
git fetch origin "$GIT_BRANCH" && git reset --hard "$GIT_BRANCH"
|
||||
else
|
||||
git clone --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"
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user