Skip to content

Commit 3c1b8ca

Browse files
authored
doc: atop.md, git.md (#642)
1 parent e4a5781 commit 3c1b8ca

File tree

2 files changed

+60
-28
lines changed

2 files changed

+60
-28
lines changed

command/atop.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ atop [选项] [参数]
2424
该列显示进程整体运行情况:
2525

2626
- sys、usr字段分别指示进程在内核态和用户态的运行时间
27-
- #proc字段指示进程总数
28-
- #zombie字段指示僵尸进程的数量
29-
- #exit字段指示atop采样周期期间退出的进程数量
27+
- `#proc` 字段指示进程总数
28+
- `#zombie` 字段指示僵尸进程的数量
29+
- `#exit` 字段指示atop采样周期期间退出的进程数量
3030

3131
### CPU列
3232

@@ -111,4 +111,4 @@ atop开发者提供了以上日志保存方式,相应的`atop.daily`脚本可
111111

112112
## 相关资料
113113

114-
- [官方手册](http://www.atoptool.nl/download/man_atop-1.pdf)
114+
- [官方手册](http://www.atoptool.nl/download/man_atop-1.pdf)

command/git.md

Lines changed: 56 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -63,25 +63,35 @@ tag 创建,列出,删除或验证使用GPG签名的标签对象
6363
6464
init
6565
66-
`git init` #初始化
66+
```shell
67+
git init # 初始化
68+
```
6769
6870
status
6971
70-
`git status` #获取状态
72+
```shell
73+
git status # 获取状态
74+
```
7175
7276
add
7377
74-
`git add file` # .或*代表全部添加
75-
`git rm --cached <added_file_to_undo>` # 在commit之前撤销git add操作
76-
`git reset head` # 好像比上面`git rm --cached`更方便
78+
```shell
79+
git add file # .或*代表全部添加
80+
git rm --cached <added_file_to_undo> # 在commit之前撤销git add操作
81+
git reset head # 好像比上面`git rm --cached`更方便
82+
```
7783
7884
commit
7985
80-
`git commit -m "message"` #此处注意乱码
86+
```shell
87+
git commit -m "message" # 此处注意乱码
88+
```
8189
8290
remote
8391
84-
`git remote add origin git@github.com:JSLite/test.git` #添加源
92+
```shell
93+
git remote add origin git@github.com:JSLite/test.git # 添加源
94+
```
8595
8696
push
8797
@@ -93,9 +103,11 @@ git push -f origin master # 强制推送文件,缩写 -f(全写--force)
93103
94104
clone
95105
96-
`git clone git://github.com/JSLite/JSLite.js.git`
97-
`git clone git://github.com/JSLite/JSLite.js.git mypro` #克隆到自定义文件夹
98-
`git clone [user@]example.com:path/to/repo.git/` #SSH协议还有另一种写法。
106+
```shell
107+
git clone git://github.com/JSLite/JSLite.js.git
108+
git clone git://github.com/JSLite/JSLite.js.git mypro # 克隆到自定义文件夹
109+
git clone [user@]example.com:path/to/repo.git/ # SSH协议还有另一种写法。
110+
```
99111
100112
git clone支持多种协议,除了HTTP(s)以外,还支持SSH、Git、本地文件协议等,下面是一些例子。`git clone <版本库的网址> <本地目录名>`
101113
@@ -156,7 +168,9 @@ ssh -T git@github.com # 测试是否成功
156168
157169
**3.修改config文件**
158170
159-
`vim ~/.ssh/config` #修改config文件,如果没有创建 `config`
171+
```shell
172+
vim ~/.ssh/config # 修改config文件,如果没有创建 `config`
173+
```
160174
161175
```shell
162176
Host jslite.github.com
@@ -269,7 +283,9 @@ usage: git remote set-url [--push] <name> <newurl> [<oldurl>]
269283
or: git remote set-url --delete <name> <url>
270284
```
271285
272-
`git remote set-url --delete origin https://oschina.net/wang/JSLite.js.git`
286+
```shell
287+
git remote set-url --delete origin https://oschina.net/wang/JSLite.js.git
288+
```
273289
274290
**3.推送代码**
275291
@@ -634,25 +650,35 @@ git config --global core.quotepath false
634650

635651
### init
636652

637-
`git init` #初始化
653+
```shell
654+
git init # 初始化
655+
```
638656

639657
### status
640658

641-
`git status` #获取状态
659+
```shell
660+
git status # 获取状态
661+
```
642662

643663
### add
644664

645-
`git add file` # .或*代表全部添加
646-
`git rm --cached <added_file_to_undo>` # 在commit之前撤销git add操作
647-
`git reset head` # 好像比上面`git rm --cached`更方便
665+
```shell
666+
git add file # .或*代表全部添加
667+
git rm --cached <added_file_to_undo> # 在commit之前撤销git add操作
668+
git reset head # 好像比上面`git rm --cached`更方便
669+
```
648670

649671
### commit
650672

651-
`git commit -m "message"` #此处注意乱码
673+
```shell
674+
git commit -m "message" # 此处注意乱码
675+
```
652676

653677
### remote
654678

655-
`git remote add origin git@github.com:JSLite/test.git` #添加源
679+
```shell
680+
git remote add origin git@github.com:JSLite/test.git # 添加源
681+
```
656682

657683
### push
658684

@@ -664,9 +690,11 @@ git push -f origin master # 强制推送文件,缩写 -f(全写--force)
664690

665691
## clone
666692

667-
`git clone git://github.com/JSLite/JSLite.js.git`
668-
`git clone git://github.com/JSLite/JSLite.js.git mypro` #克隆到自定义文件夹
669-
`git clone [user@]example.com:path/to/repo.git/` #SSH协议还有另一种写法。
693+
```shell
694+
git clone git://github.com/JSLite/JSLite.js.git
695+
git clone git://github.com/JSLite/JSLite.js.git mypro # 克隆到自定义文件夹
696+
git clone [user@]example.com:path/to/repo.git/ # SSH协议还有另一种写法。
697+
```
670698

671699
git clone支持多种协议,除了HTTP(s)以外,还支持SSH、Git、本地文件协议等,下面是一些例子。`git clone <版本库的网址> <本地目录名>`
672700

@@ -817,7 +845,9 @@ git push -u origin branchName # 提交分支到远程origin主机中
817845

818846
### 拉取
819847

820-
`git fetch -p` #拉取远程分支时,自动清理 远程分支已删除,本地还存在的对应同名分支。
848+
```shell
849+
git fetch -p # 拉取远程分支时,自动清理 远程分支已删除,本地还存在的对应同名分支。
850+
```
821851

822852
### 分支合并
823853

@@ -830,7 +860,9 @@ git merge test # 将test分支合并到当前分支
830860

831861
### 重命名
832862

833-
`git branch -m old new` #重命名分支
863+
```shell
864+
git branch -m old new # 重命名分支
865+
```
834866

835867
### 查看
836868

0 commit comments

Comments
 (0)