File tree Expand file tree Collapse file tree 6 files changed +57
-0
lines changed
Expand file tree Collapse file tree 6 files changed +57
-0
lines changed Original file line number Diff line number Diff line change 11# 贡献指南/Contributing Guide
22
3+
4+
5+
36## ✍️ 添加新文章
47
58### 步骤1:选择位置
Original file line number Diff line number Diff line change 1+ ## Git 提交 Guide
2+ #### 1. 将本项目直接fork到自己的账号下,这样就可以直接在自己的账号下进行修改和提交。
3+ ![ fork1] ( ./fork1.jpg )
4+ ![ fork2] ( ./fork2.png )
5+
6+ * 注意取消勾选仅克隆当前分支*
7+
8+ #### 2. 克隆项目
9+ ```
10+ git clone https://github.com/你自己的仓库名/involutionhell.github.io.git
11+ ```
12+ 修改为自己fork的仓库,改为你的https仓库的git地址
13+
14+ #### 3. 创建自己的分支
15+ 列出现有分支
16+ ```
17+ git branch -a #用于列出当前Git仓库中所有的分支,包括本地分支和远程分支。
18+ ```
19+ ![ branch-all] ( ./branch-all.png )
20+
21+ ##### 3.1 创建功能分支的约定命名
22+ ```
23+ git checkout -b feat/your-feature
24+
25+ # 它的作用是创建一个新的分支并立即切换到该分支上。
26+
27+ 具体来说,这个命令相当于同时执行了两个操作:
28+ git branch feat/your-feature - 创建名为 feat/your-feature 的新分支
29+ git checkout feat/your-feature - 切换到这个新创建的分支
30+
31+ 其中 feat/your-feature 是分支名称,通常遵循约定式命名:
32+
33+ feat/ 前缀表示这是一个功能(feature)分支
34+ 后面的 your-feature 通常是对功能的简要描述
35+ ```
36+ ##### 3.2 创建文档分支的约定命名
37+ ```
38+ git checkout -b doc_raven # 自定义一个新的分支
39+ #git checkout -b doc_id 分支名字改为你的uid分支名称
40+ ```
41+ #### 4. 提交更改分支
42+ ```
43+ git add .
44+ 根据你的变动情况
45+ git commit -m "add xxx" # 添加信息记录
46+ or
47+ git commit -m "edit xxx" # 修改信息记录
48+ or
49+ git commit -m "delete xxx" #删除信息记录
50+ ```
51+
52+ #### 5. 推送分支到远程仓库
53+ ``` git push origin doc_raven
54+ ```
You can’t perform that action at this time.
0 commit comments