General Question
关于新生学习计划training-plan后续发展与管理的讨论与记录,包括但不限于仓库版本纪要、仓库组织框架,作业规范,重要管理命令,对外使用,如果有需要优化的地方一起讨论:
仓库版本纪要
2019-07-06
仓库上线#11🚀
2021-01-13
2020级归档[#28 ,training-plan-2020]:baby:
仓库组织框架
每一级从template分支拉一个私仓开始学习计划,结束后整理归档回公仓,及时对template和homework打上tag。
- tag命名形式
homework2020
homework2021
homework2022
template2020
tempalte2021
tempalte2022
- 分支结构
├─master // 目前是2020级的作业,后续可以改名
├─template // 计划模板,应不断更新,与时俱进
├─training_plan_2020 // 20级归档
├─training_plan_2021 // 21级归档
└─training_plan_2022 // 22级归档
作业规范
代码规范
google-cpp-style
google-python-style
uber-golang-style
...
PR规范
关于实验室项目多人协作开发流程的讨论
重要管理命令
从template拉取私仓
- github上新建一个私仓
- 添加公仓作为 public remote
git remote add public git@github.com:CDDSCLab/training-plan.git
- 切到public/template
git checkout public/template
- 将public/template
push到新建的私仓上面
从私仓中cherry-pick做得好的PR
- 添加私仓作为remote
git remote add private git://gitUrl
- 拉取不合并
git fetch private
- 查看想要pick的brachname的log
git log private/branchname
- cherry pick
单个commit:git cherry-pick <commitHash>
多个commit:git cherry-pick <HashA> <HashB>
[A,B): git cherry-pick A^..B
git submodule的使用
一些项目可能是放在同学自己的个人仓库上面的,可以使用submodule的形式进行链接。
- --name增加名字
git submodule add git://gitUrl path-to-submodule
- 下面命令能改变
.gitmodules每个submodule的path,submodule名字不会改变,可以手动改变
git mv path-to-old-submodule path-to-new-submodule
- Delete the relevant section from the
.gitmodules file.
- Stage the
.gitmodules changes:
git add .gitmodules
- Delete the relevant section from
.git/config.
- Remove the submodule files from the working tree and index:
git rm --cached path_to_submodule(no trailing slash).
- Remove the submodule's .git directory:
rm -rf .git/modules/path_to_submodule
- Commit the changes:
git commit -m "Removed submodule <name>"
- Delete the now untracked submodule files:
rm -rf path_to_submodule
- 克隆使用含有submodule的项目
包含对应的空目录需要使用以下两个命令
git submodule init
git submodule update
对外使用
Fork,Issues and PR are welcom.
MIT License.
General Question
关于新生学习计划
training-plan后续发展与管理的讨论与记录,包括但不限于仓库版本纪要、仓库组织框架,作业规范,重要管理命令,对外使用,如果有需要优化的地方一起讨论:仓库版本纪要
2019-07-06
仓库上线#11🚀
2021-01-13
2020级归档[#28 ,training-plan-2020]:baby:
仓库组织框架
homework2020
homework2021
homework2022
template2020
tempalte2021
tempalte2022
├─master // 目前是2020级的作业,后续可以改名
├─template // 计划模板,应不断更新,与时俱进
├─training_plan_2020 // 20级归档
├─training_plan_2021 // 21级归档
└─training_plan_2022 // 22级归档
作业规范
代码规范
google-cpp-style
google-python-style
uber-golang-style
...
PR规范
关于实验室项目多人协作开发流程的讨论
重要管理命令
从template拉取私仓
git remote add public git@github.com:CDDSCLab/training-plan.gitgit checkout public/templatepush到新建的私仓上面从私仓中cherry-pick做得好的PR
git remote add private git://gitUrlgit fetch privategit log private/branchname单个commit:
git cherry-pick <commitHash>多个commit:
git cherry-pick <HashA> <HashB>[A,B):
git cherry-pick A^..Bgit submodule的使用
git submodule add git://gitUrl path-to-submodule.gitmodules每个submodule的path,submodule名字不会改变,可以手动改变git mv path-to-old-submodule path-to-new-submodule.gitmodulesfile..gitmoduleschanges:git add .gitmodules.git/config.git rm --cached path_to_submodule(no trailing slash).rm -rf .git/modules/path_to_submodulegit commit -m "Removed submodule <name>"rm -rf path_to_submodule包含对应的空目录需要使用以下两个命令
git submodule initgit submodule update对外使用
Fork,Issues and PR are welcom.
MIT License.