doc: atop.md, git.md (#642)

This commit is contained in:
focksor 2025-04-09 12:58:33 +08:00 committed by GitHub
parent e4a5781542
commit 3c1b8ca90c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 60 additions and 28 deletions

View File

@ -24,9 +24,9 @@ atop [选项] [参数]
该列显示进程整体运行情况: 该列显示进程整体运行情况:
- sys、usr字段分别指示进程在内核态和用户态的运行时间 - sys、usr字段分别指示进程在内核态和用户态的运行时间
- #proc字段指示进程总数 - `#proc` 字段指示进程总数
- #zombie字段指示僵尸进程的数量 - `#zombie` 字段指示僵尸进程的数量
- #exit字段指示atop采样周期期间退出的进程数量 - `#exit` 字段指示atop采样周期期间退出的进程数量
### CPU列 ### CPU列

View File

@ -63,25 +63,35 @@ tag 创建列出删除或验证使用GPG签名的标签对象
init init
`git init` #初始化 ```shell
git init # 初始化
```
status status
`git status` #获取状态 ```shell
git status # 获取状态
```
add add
`git add file` # .或*代表全部添加 ```shell
`git rm --cached <added_file_to_undo>` # 在commit之前撤销git add操作 git add file # .或*代表全部添加
`git reset head` # 好像比上面`git rm --cached`更方便 git rm --cached <added_file_to_undo> # 在commit之前撤销git add操作
git reset head # 好像比上面`git rm --cached`更方便
```
commit commit
`git commit -m "message"` #此处注意乱码 ```shell
git commit -m "message" # 此处注意乱码
```
remote remote
`git remote add origin git@github.com:JSLite/test.git` #添加源 ```shell
git remote add origin git@github.com:JSLite/test.git # 添加源
```
push push
@ -93,9 +103,11 @@ git push -f origin master # 强制推送文件,缩写 -f全写--force
clone clone
`git clone git://github.com/JSLite/JSLite.js.git` ```shell
`git clone git://github.com/JSLite/JSLite.js.git mypro` #克隆到自定义文件夹 git clone git://github.com/JSLite/JSLite.js.git
`git clone [user@]example.com:path/to/repo.git/` #SSH协议还有另一种写法 git clone git://github.com/JSLite/JSLite.js.git mypro # 克隆到自定义文件夹
git clone [user@]example.com:path/to/repo.git/ # SSH协议还有另一种写法。
```
git clone支持多种协议除了HTTP(s)以外还支持SSH、Git、本地文件协议等下面是一些例子。`git clone <版本库的网址> <本地目录名>` git clone支持多种协议除了HTTP(s)以外还支持SSH、Git、本地文件协议等下面是一些例子。`git clone <版本库的网址> <本地目录名>`
@ -156,7 +168,9 @@ ssh -T git@github.com # 测试是否成功
**3.修改config文件** **3.修改config文件**
`vim ~/.ssh/config` #修改config文件,如果没有创建 `config` ```shell
vim ~/.ssh/config # 修改config文件如果没有创建 `config`
```
```shell ```shell
Host jslite.github.com Host jslite.github.com
@ -269,7 +283,9 @@ usage: git remote set-url [--push] <name> <newurl> [<oldurl>]
or: git remote set-url --delete <name> <url> or: git remote set-url --delete <name> <url>
``` ```
`git remote set-url --delete origin https://oschina.net/wang/JSLite.js.git` ```shell
git remote set-url --delete origin https://oschina.net/wang/JSLite.js.git
```
**3.推送代码** **3.推送代码**
@ -634,25 +650,35 @@ git config --global core.quotepath false
### init ### init
`git init` #初始化 ```shell
git init # 初始化
```
### status ### status
`git status` #获取状态 ```shell
git status # 获取状态
```
### add ### add
`git add file` # .或*代表全部添加 ```shell
`git rm --cached <added_file_to_undo>` # 在commit之前撤销git add操作 git add file # .或*代表全部添加
`git reset head` # 好像比上面`git rm --cached`更方便 git rm --cached <added_file_to_undo> # 在commit之前撤销git add操作
git reset head # 好像比上面`git rm --cached`更方便
```
### commit ### commit
`git commit -m "message"` #此处注意乱码 ```shell
git commit -m "message" # 此处注意乱码
```
### remote ### remote
`git remote add origin git@github.com:JSLite/test.git` #添加源 ```shell
git remote add origin git@github.com:JSLite/test.git # 添加源
```
### push ### push
@ -664,9 +690,11 @@ git push -f origin master # 强制推送文件,缩写 -f全写--force
## clone ## clone
`git clone git://github.com/JSLite/JSLite.js.git` ```shell
`git clone git://github.com/JSLite/JSLite.js.git mypro` #克隆到自定义文件夹 git clone git://github.com/JSLite/JSLite.js.git
`git clone [user@]example.com:path/to/repo.git/` #SSH协议还有另一种写法 git clone git://github.com/JSLite/JSLite.js.git mypro # 克隆到自定义文件夹
git clone [user@]example.com:path/to/repo.git/ # SSH协议还有另一种写法。
```
git clone支持多种协议除了HTTP(s)以外还支持SSH、Git、本地文件协议等下面是一些例子。`git clone <版本库的网址> <本地目录名>` git clone支持多种协议除了HTTP(s)以外还支持SSH、Git、本地文件协议等下面是一些例子。`git clone <版本库的网址> <本地目录名>`
@ -817,7 +845,9 @@ git push -u origin branchName # 提交分支到远程origin主机中
### 拉取 ### 拉取
`git fetch -p` #拉取远程分支时,自动清理 远程分支已删除,本地还存在的对应同名分支。 ```shell
git fetch -p # 拉取远程分支时,自动清理 远程分支已删除,本地还存在的对应同名分支。
```
### 分支合并 ### 分支合并
@ -830,7 +860,9 @@ git merge test # 将test分支合并到当前分支
### 重命名 ### 重命名
`git branch -m old new` #重命名分支 ```shell
git branch -m old new # 重命名分支
```
### 查看 ### 查看