2021/09/18-2021/12/27
在《将本地已有项目添加到gitee仓库中》
https://zhuanlan.zhihu.com/p/411306340
https://blog.csdn.net/chentuo2000/article/details/120345622
一文中我们已经发布(push)了几个项目到gitee仓库。
在《修改git commit的注释》
https://zhuanlan.zhihu.com/p/411460494
https://blog.csdn.net/chentuo2000/article/details/120353018
一文中我们修改了注释。
本文我们将修改过的代码上传到gitee上,并创建标签。
1. 将修改过的代码上传到gitee上
- 将本地所有修改了的文件添加git缓存中
git add .
new file 新添加的文件
modified 修改过的文件
- 提交
git commit -m "2021/9/18日的修改"
- 下拉代码
git pull
先将远程代码跟本地的代码合并,如果远程没有更新,可以不用这一步,最好是每次都执行这一步。
执行完这一步之后检查代码,如果有问题,解决完以后再重新执行前面两步操作。
- 发布代码更新远程
git push
- 看看日志
git log
- 看远程仓库
2. 创建标签
- 查看分支
本地分支:
git branch
远程分支:
git branch -r
所有分支:
git branch -a
- 切换分支
git checkout master
- 创建标签
git tag v1.0.0
或者
git tag v2.0.0 -m "添加新功能"
- 查看标签
git tag
- 查看标签信息
git show v1.0.0
- 推送标签到远程
git push origin v1.0.0
- 查看远程标签
http://git-scm.com/docs/git-ls-remote
git ls-remote
或者