课程内容:
- 第一章 Git是什么
- 第二章 Git基础命令
- 第三章 Git分支管理
- 第四章 Git工具
- 第五章 Git内部原理
- 第六章 GitFlow工作流实战
- 第七章 Git提交规范
- 第八章 Github/Gitee使用说明
- 第九章 Git可视化工具下载
- 第十章 Git团队协作以及合并时的diff工具
主分支为main
本项目使用Forking
工作流,具体参考atlassian文档
大致步骤如下:
- 在GitHub上Fork本仓库
- Clone Fork后的个人仓库
- 设置
upstream
仓库地址,并禁用push
- 使用分支开发,课程分支名为
lecture{#NO}
,#NO
保持两位,如lecture07
,对应课程目录 - PR之前保持与原始仓库的同步,之后发起PR请求
命令示例:
# fork
# clone
git clone [email protected]:USERNAME/faster-git.git
# set upstream
git remote add upstream [email protected]:datawhalechina/faster-git.git
# disable upstream push
git remote set-url --push upstream DISABLE
# verify
git remote -v
# some sample output:
# origin [email protected]:tomowang/faster-git.git (fetch)
# origin [email protected]:tomowang/faster-git.git (push)
# upstream [email protected]:datawhalechina/faster-git.git (fetch)
# upstream DISABLE (push)
# do your work
git checkout -b lecture07
# edit and commit and push your changes
git push -u origin lecture07
# keep your fork up to date
## fetch upstream main and merge with forked main branch
git fetch upstream
git checkout main
git merge upstream/main
## rebase brach and force push
git checkout lecture07
git rebase main
git push -f
提交信息使用如下格式:<type>: <short summary>
<type>: <short summary>
│ │
│ └─⫸ Summary in present tense. Not capitalized. No period at the end.
│
└─⫸ Commit Type: lecture{#NO}|others
others
包括非课程相关的改动,如本README.md
中的变动,.gitignore
的调整等。