Skip to content

Commit d2b3182

Browse files
committed
修改文档目录结构
1 parent 387079c commit d2b3182

File tree

11 files changed

+146
-96
lines changed

11 files changed

+146
-96
lines changed

.dumirc.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { defineConfig } from 'dumi';
33
export default defineConfig({
44
themeConfig: {
55
name: '',
6+
footer: false
67
},
78
publicPath: '/docs/',
89
history: {

docs/Git/index.md

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/Homebrew/index.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

docs/NodeJS/index.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

docs/environment/git.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
---
2+
group:
3+
title: 环境配置
4+
order: 4
5+
---
6+
7+
## 安装Git
8+
```bash
9+
brew install git
10+
```
11+
12+
## 配置
13+
14+
### 用户名 & 邮箱
15+
```bash
16+
git config --global user.name "你的用户名"
17+
18+
git config --global user.email "你的邮箱地址"
19+
```
20+
21+
### 生成SSH公钥
22+
```bash
23+
ssh-keygen -t rsa
24+
```
25+
26+
### 查看SSH公钥
27+
```bash
28+
cat ~/.ssh/id_rsa.pub
29+
```
30+
31+
## 常用命令
32+
33+
### git stash
34+
35+
git stash 命令用于临时保存当前工作区的改动,这样你就可以在不提交改动的情况下切换到其他分支。
36+
37+
以下是一些常用的 git stash 命令:
38+
39+
```bash
40+
# 将当前的改动保存到一个新的 stash 中,你可以提供一个可选的消息来描述这个 stash
41+
git stash save "message"
42+
43+
# 列出所有的 stash
44+
git stash list
45+
46+
# 应用最近的 stash 到当前工作区,但不会从 stash 列表中删除这个 stash
47+
git stash apply
48+
49+
# 应用最近的 stash 到当前工作区,并从 stash 列表中删除这个 stash
50+
git stash pop
51+
52+
# 删除指定的 stash
53+
git stash drop stash@{n}
54+
55+
# 删除所有的 stash
56+
git stash clear
57+
58+
```
59+
60+
61+
### git rebase
62+
63+
git rebase 命令用于将一系列提交应用到另一个基点上,它是 Git 中用于整理提交以使其更清晰的主要工具之一。
64+
65+
以下是一些常用的 git rebase 命令:
66+
67+
```bash
68+
# 将当前分支的提交应用到 <base> 分支上。这将使得当前分支的提交看起来像是在 <base> 分支的最新提交之后进行的
69+
git rebase <base>
70+
71+
# 以交互方式进行 rebase。这将打开一个 UI,让你可以选择要如何处理每个提交(包括丢弃、修改提交信息、合并等)
72+
git rebase -i <base>
73+
74+
# 在解决完 rebase 过程中的冲突后,使用此命令继续 rebase 进程
75+
git rebase --continue
76+
77+
# 如果你想放弃当前的 rebase 进程,可以使用此命令
78+
git rebase --abort
79+
```

docs/environment/homebrew.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
group:
3+
title: 环境配置
4+
order: 0
5+
---
6+
7+
## 官网安装
8+
官网:[Homebrew](https://brew.sh/)
9+
10+
11+
## 第三方脚本安装(推荐)
12+
```bash
13+
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
14+
```
Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,47 @@
1-
# iTem2
2-
1+
---
2+
group:
3+
title: 环境配置
4+
order: 1
5+
---
36

47
## 安装
5-
```bash
6-
# 官网下载
7-
https://iterm2.com/
8-
```
8+
9+
官网下载:[iterm2](https://iterm2.com/)
10+
911

1012
## 美化改造
1113

1214
### 配置
1315

14-
将iTem2设置为默认终端:(菜单栏)iTerm2 -> Make iTerm2 Default Term
16+
将iTerm2设置为默认终端:(菜单栏)iTerm2 -> Make iTerm2 Default Term
1517

16-
![alt text](./image.png)
18+
![alt text](./images/iterm2-1.png)
1719

1820
然后打开偏好设置preference,选中Keys,勾选Hotkey下的Show/hide iTerm2 with a system-wide hotkey,将热键设置为command+. ,这样你就可以通过command+. 全局热键来打开或关闭iTerm2窗口,非常方便。
1921

20-
![alt text](./image-1.png)
21-
22+
![alt text](./images/iterm2-2.png)
2223

2324

2425
### 安装oh-my-zsh
2526

26-
github连接:https://github.com/robbyrussell/oh-my-zsh
27+
https://github.com/robbyrussell/oh-my-zsh
2728

28-
使用 crul 安装:
2929

30-
```bash
31-
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
32-
```
30+
### 配色方案
3331

34-
或使用wget:
32+
推荐采用 solarized [官网](https://ethanschoonover.com/solarized/) 下载后解压,打开 iTerm2 下的偏好设置 preference ,点开 profiles 下的colors 选项,点击右下角的 Color Presets 选项,选择import ,导入解压到的 solarized 文件下的Solarized Dark.itermcolors。
3533

3634

37-
```bash
38-
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
39-
```
40-
41-
42-
### 主题
35+
### 修改主题
4336

44-
安装成功后,用vim打开隐藏文件 .zshrc ,修改主题为 agnoster:
37+
用vim打开隐藏文件 .zshrc ,修改主题为 agnoster:
4538

4639
```bash
4740
ZSH_THEME="agnoster"
4841
```
4942

50-
应用这个主题需要特殊的字体支持,否则会出现乱码情况,这时我们来配置字体:
43+
44+
### 配置字体
5145

5246
1.使用 [Meslo](https://github.com/powerline/fonts/blob/master/Meslo%20Slashed/Meslo%20LG%20M%20Regular%20for%20Powerline.ttf) 字体,点开连接点击 view raw 下载字体。
5347

@@ -67,7 +61,7 @@ ZSH_THEME="agnoster"
6761
1.克隆仓库到本地 ~/.oh-my-zsh/custom/plugins 路径下
6862

6963
```bash
70-
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
64+
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
7165
```
7266

7367
2.用 vim 打开 .zshrc 文件,找到插件设置命令,默认是 plugins=(git) ,我们把它修改为
@@ -76,12 +70,9 @@ git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh
7670
plugins=(zsh-autosuggestions git)
7771
```
7872

79-
8073
3.重新打开终端窗口。
8174

82-
PS:当你重新打开终端的时候可能看不到变化,可能你的字体颜色太淡了,我们把其改亮一些:
83-
84-
移动到 ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions 路径下
75+
修改字体亮度 进入到 ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions 路径下
8576

8677
```bash
8778
cd ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions

docs/environment/nodejs.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
group:
3+
title: 环境配置
4+
order: 3
5+
---
6+
7+
8+
## 官网安装(不推荐)
9+
10+
[NodeJs官网](https://nodejs.org/zh-cn)
11+
12+
13+
## 通过nvm安装(推荐)
14+
15+
### 1、安装nvm
16+
17+
```bash
18+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
19+
```
20+
21+
### 2、使用nvm安装指定版本 Node.js
22+
```bash
23+
nvm install 22
24+
```
25+
26+
### 3、查看Node版本号
27+
```bash
28+
node -v # should print `v22.2.0`
29+
```

0 commit comments

Comments
 (0)