首页  

git pull --rebase 使用     所属分类 git 浏览量 1199
git pull = git fetch + git merge
git pull --rebase = git fetch + git rebase

git pull 拉取代码 冲突时手工合并

git pull --rebase  冲突时 自动创建新分支,在这个新的分支上处理冲突

rebase in progress; onto xxxxxx
You are currently rebasing branch 'master' on 'xxxxxx'.
(fix conflicts and then run "git rebase --continue")


解决冲突然后执行git rebase --continue命令

不使用rebase, 解决冲突过程

1 git add .
2 git commit -m "xxx" 
3 git push  因为本地与远程仓库代码有冲突,所以接下来
4 git pull 拉取远程代码,手工解决冲突

5 解决冲突后   
git add .  
git commit -m "xxx"  
git push


使用 rebase 之后 ,第5步变成

git add .
git rebase --continue
git push


git pull --rebase   合并代码冲突时 , 在随机创建的分支上处理冲突,避免直接污染原来的分支

上一篇     下一篇
HIVE数据模型

spark

5G简介

中概互联50ETF

互联网金融大数据爬虫业务简介

现金贷与消费贷