From a2c86b8d3475b019d330cc1718d73668233908f2 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sat, 3 Jan 2026 03:21:57 +0800 Subject: Change git pull to fetch and reset in setup scripts This ensures a clean state by discarding any local changes when updating the documents repository. --- setup.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'setup.sh') diff --git a/setup.sh b/setup.sh index ac4ecb8..fb2a6d6 100755 --- a/setup.sh +++ b/setup.sh @@ -1,6 +1,9 @@ # Setup documents repo if [ -d "docs/Documents/.git" ]; then - cd docs/Documents && git pull origin main && cd - + cd docs/Documents + git fetch origin main + git reset --hard origin/main + cd - else git clone https://github.com/JustEnoughVCS/Documents.git docs/Documents fi -- cgit