-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
GRIT
committed
Aug 27, 2023
1 parent
f94521d
commit 688fdd3
Showing
6 changed files
with
20,224 additions
and
12,364 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: HTTP协议的发展 | ||
date: 2023-4-22 | ||
date: 2023-7-22 | ||
tags: | ||
- HTTP1_1 | ||
- HTTP2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
title: docker命令 | ||
date: 2023-8-23 | ||
tags: | ||
- docker | ||
categories: | ||
- docker | ||
--- | ||
|
||
## docker 常用命令 | ||
|
||
### 启动挂载容器 | ||
|
||
### 容器导出与导入 | ||
|
||
### 镜像导出与导入 | ||
|
||
以上两种只针对容器,不包括挂载的文件;镜像体积大,因为包括了历史记录等等 | ||
|
||
### 数据卷导出与导入 | ||
|
||
#### docker 数据卷的备份 (导出) | ||
|
||
```dockerfile | ||
//多个数据卷的备份 | ||
docker run --volumes-from 数据卷容器ID/数据卷容器名称 -v 宿主机备份目录:容器备份目录 镜像ID/镜像名称[:版本号] tar cvf 容器目录/数据卷压缩文件(格式为tar压缩文件) 容器数据卷文件1/目录1 容器数据卷文件2/目录2 | ||
|
||
docker run --volumes-from mycentos -v $(pwd):/backup centos tar cvf /backup/newcentos.tar /containerVolume1 /containerVolume2 | ||
``` | ||
|
||
#### docker 数据卷的迁移与恢复 (导入) | ||
|
||
```dockerfile | ||
//单个数据卷 与 多个数据卷的 数据卷恢复指令相同 | ||
docker run --volumes-from 需要恢复数据的数据卷容器ID/名称 -v 宿主机备份目录:容器备份目录 镜像ID/镜像名称[:版本号] tar xvf 容器备份目录/数据卷压缩文件(格式为tar压缩文件) | ||
|
||
docker run --volumes-from mycentos -v $(pwd):/backup centos tar xvf /backup/newcentos.tar | ||
|
||
//如果想要在执行完数据恢复指令后,删除临时容器,请在run 后面加上--rm属性,表示在执行完后立即删除该容器 | ||
docker run --rm --volumes-from mycentos -v $(pwd):/backup centos tar xvf /backup/newcentos.tar | ||
``` | ||
|
||
UI | ||
|
||
河网 | ||
|
||
数据库 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
title: git常用命令 | ||
date: 2023-8-26 | ||
tags: | ||
- git | ||
categories: | ||
- git | ||
--- | ||
|
||
### 强制 pull | ||
|
||
1. git fetch --all | ||
2. git reset --hard origin/main | ||
3. git pull | ||
|
||
### 清除已经跟踪的文件(如:dist) | ||
|
||
1. git rm -r --cached dist | ||
2. 在.gitignore 添加 dist/ | ||
3. 重新提交 | ||
|
||
### 撤销 commit 和 add 的文件 | ||
|
||
git reset --soft HEAD~1 | ||
|
||
git add . (只添加修改的文件夹) | ||
|
||
git add -A(添加所有文件) | ||
|
||
### 撤销 add 的某个文件 | ||
|
||
1. 不删除工作区的修改内容 | ||
|
||
git restore --staged <文件路径> | ||
|
||
2. 删除工作区的修改内容 | ||
|
||
git restore <文件路径> | ||
|
||
### 强制撤销 commit 的文件,回到某一次 commit(清除所有 add) | ||
|
||
git reset --hard HEAD~1 | ||
|
||
### 切换分支 | ||
|
||
git checkout xxx | ||
|
||
### 提交 | ||
|
||
### 查看所有分支树 | ||
|
||
`gitk --all` | ||
|
||
画图工具: | ||
|
||
https://mermaid.js.org/syntax/gitgraph.html |
Oops, something went wrong.