git使用记录(持续更新)
代码仓库地址:Darling-123456/go_learning: go学习过程记录
记录一下使用git的过程
起初是学习的go课程是21周的,我想把每周学的东西单独做个提交,顺带练练git,就尝试建立分支什么的
week2
1 2 3 4 5
| git add . git commit -m "week2: 登录注册 + session中间件" git branch week2 # 从当前 commit 创建分支,但你还留在 master 上 git push origin master git push origin week2
|
这是master分支,而week2分支和这个一样的

但是我的week2里面本意是只想放项目相关的代码的,所以执行了以下命令
1 2 3 4
| git checkout week2 git rm -r gin/ gorm/ go_exercise/ homework/ leetcode/ git commit -m "week2: 登录+注册功能" git push origin week2
|

week3
1 2 3 4 5 6
| git branch week3 git checkout week3
git add webook_project/ git commit -m "week3: JWT 登录 + 中间件验签 + 刷新" git push origin week3
|

1 2 3 4 5 6
| git branch week3 git checkout week3
git add webook_project/ git commit -m "week3: 保护系统+k8s部署web服务" git push origin week3
|

1 2 3 4 5 6
| git branch week3 git checkout week3
git add webook_project/ git commit -m "week3: 保护系统+k8s部署web服务" git push origin week3
|
week4
1 2 3 4 5
| git branch week3 # 先创建分支 git checkout week3 # 再切过去 git add webook_project/ git commit -m "week3: 保护系统+k8s部署web服务" git push origin week3
|