git基础操作
- 查看变更
git status
- 选择要合并的代码
git add
- 提交变更内容
git commit -m "PR:123 日期:2024年02月19日 内容:支持清除告警事件 责任人:yuanb"
- 合入远程仓库
git push origin HEAD:refs/for/master
5、查看要合入的分支
git branch
6、查看所有分支
git branch -a
7、对比修改文件内容
git diff threat-ms/pom.xml
8、重新合入
git commit --amend -m "PR:MARS-64229 日期:2024年02月19日 内容:支持清除告警事件 责任人:袁博"
9、git commit之后撤销:
git reset --soft HEAD^
10、git add之后撤销
git reset
11、获取版本ID
git log 获取版本commit ID
12、版本回退
git reset 版本commit ID