File tree Expand file tree Collapse file tree 1 file changed +11
-13
lines changed
Expand file tree Collapse file tree 1 file changed +11
-13
lines changed Original file line number Diff line number Diff line change 2626### 服务端更新代码
2727
2828``` bash
29+ # 停止 docker
30+ docker-compose down
31+
2932# 暂存修改
3033git stash push -- docker-compose.yml
3134
@@ -35,12 +38,17 @@ git pull
3538# 拉取 build 分支最新
3639git 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# 恢复修改
4348git stash pop
49+
50+ # 启动 docker
51+ docker-compose up -d
4452```
4553
4654## Command
@@ -58,13 +66,3 @@ git stash pop
5866``` bash
5967git stash push -- docker-compose.yml
6068```
61-
62- ### 丢弃本地更新
63-
64- ``` bash
65- # 先移除所有未跟踪的文件和目录
66- git clean -fd
67-
68- # 再重置已跟踪文件
69- git reset --hard HEAD
70- ```
You can’t perform that action at this time.
0 commit comments