git rebase方式提交代码的命令

2020-04-21  本文已影响0人  停心阁

1 . 查看状态
git status

2 . 添加到本地缓存区
git add .

3 . 提交到本地缓存区
git commit -m "修改"

4 .获取远程分支的最新代码与本地分支合并
git pull --rebase

5 .如果出现冲突,先解决冲突,然后使用 git add .git rebase --continue命令继续合并,如果没有冲突直接执行第六步
git add .
git rebase --continue

6 .推送到远程分支
git push

rebase 方式提交代码的命令就完了

下面在介绍介个相关的命令

如果想了解原理网络上有很多资料,我推荐一个博客:
https://blog.csdn.net/wh_19910525/article/details/7554489

上一篇 下一篇

猜你喜欢

热点阅读