Skip to content

Commit cf7d02d

Browse files
committed
update readme
1 parent 8adfa68 commit cf7d02d

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

README.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
### 服务端更新代码
2727

2828
```bash
29+
# 停止 docker
30+
docker-compose down
31+
2932
# 暂存修改
3033
git stash push -- docker-compose.yml
3134

@@ -35,12 +38,17 @@ git pull
3538
# 拉取 build 分支最新
3639
git fetch origin build
3740

38-
# 只恢复 .next 文件到当前工作目录,不加入暂存区
39-
git restore --source origin/build .next
40-
# git restore --source origin/build --staged --worktree .next
41+
# 删除 .next 和 public 文件夹
42+
sudo rm -rf .next/ public/
43+
44+
# 恢复最新 build
45+
git restore --source origin/build .next public
4146

4247
# 恢复修改
4348
git stash pop
49+
50+
# 启动 docker
51+
docker-compose up -d
4452
```
4553

4654
## Command
@@ -58,13 +66,3 @@ git stash pop
5866
```bash
5967
git stash push -- docker-compose.yml
6068
```
61-
62-
### 丢弃本地更新
63-
64-
```bash
65-
# 先移除所有未跟踪的文件和目录
66-
git clean -fd
67-
68-
# 再重置已跟踪文件
69-
git reset --hard HEAD
70-
```

0 commit comments

Comments
 (0)