Commit 04f969dd by shipengwei

init

parent 3baa3e37
{
"idf.pythonInstallPath": "C:\\Espressif\\tools\\idf-python\\3.11.2\\python.exe"
}
\ No newline at end of file
......@@ -8,6 +8,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "解决方案项", "解决方案项", "{9FA3D6BD-1EC1-3BA5-80CB-CE02773A58D5}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
Git.md = Git.md
README.md = README.md
EndProjectSection
EndProject
......
# Git使用指南
```
https://gitee.com/opensource-guide/git-tutorial/getting-started/how-to-install-git.html
```
## 项目规范
```
项目由两个分支组成:
master:主分支,不能直接在上面进行代码编写的,只能从develop分支合入代码。
备注:提交到主分支的代码一定要是能编译发布成功的,因为推送到主分支的代码会被自动构建为Docker镜像,因此需要构建镜像的时候把代码合并到主分支即可。
develop:开发分支,允许编译不通过,允许有bug,日常提交都提交到该分支中。
备注:开发分支等同于之前的SVN,大家日常保存、BUG修复等操作都在该分支进行,要打包镜像的话,就把开发分支合并到主分支即可。
如何处理Tag问题,如何处理交付物问题?
封板规范:
封板时,从开发分支拉出分支,分支名命名规范为:release/xxx.0.xx.xx(版本号),例如:release/1.0.1.1205120100
封板完成后,合并release分支到develop分支,删除release分支,然后把develop分支合并到master分支,并且打tag,tag名命名规范为:Vxxx.0(xx.xx)(版本号),例如:V1.0.1(1205120100)
打完tag,合并master分支到develop分支,删除master分支,然后推送到远程仓库。
封板规范:
封板时,从开发分支拉出分支,分支名命名规范为:feature/xxx.x(功能点),例如:feature/01.01
封板完成后,合并feature分支到develop分支,删除feature分支。
```
##
## 核心操作
```
在Windows上使用powershell创建自己的公钥私钥(C:\Users\[User]\.ssh\)
ssh-keygen -t rsa -b 4096 -C "email@example.com" -f d:\ssh\gitlab_rsa_4096
将密钥指定给GitLab使用,编辑C:\Users\[User]\.ssh\config ,添加指定:
Host gitee.com
HostName git.aipark.com
IdentityFile d:\ssh\gitlab_rsa_4096
获取远程仓库
git clone git@git.aipark.com:eoc-group/dotnet-cicd-demo.git
在项目目录设置当前项目的用户名和邮箱
git config user.name "你的用户名"
git config user.email "email@example.com"
拉取代码,提交代码,切换分支请使用IDE上的Git管理工具
查看所有的封板标签
git tag
打一个标签
git tag v6.2.0.2508131427
推送标签到服务器
git push origin v6.2.0.2508131427
```
### 其他
查询当前项目的用户名和邮箱
git config user.name
git config user.email
创建本地仓库
git init
获取当前项目的远程仓库地址:
git remote -v
查看当前项目分支:
git branch
创建本地分支并切换到该分支上:
git checkout -b [name]
###
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment