[英]I would like to use simple git merge instead of git rebase, which are the differences?
在我執行git pull upstream master
命令后,“git”建議我先解決沖突,然后git add file
,然后再添加git rebase --continue
。
但是,我不想使用 git rebase,我更喜歡 git 合並,這對我來說似乎更干凈。 有什么建議嗎?
看起來您的 git 配置告訴使用rebase
on pull ,這可以解釋為什么您的git pull
開始了rebase
而不是merge
。
rebase
並改用merge
,您可以運行:git rebase --abort # aborts the rebase, and resets to the original commit
git merge origin/mybranch # merge the remote branch
pull
設置,請運行:git config --show-origin --get pull.rebase
# if you see that the setting is global, and you want to drop it :
git config --global --unset pull.rebase
# if you want to disable it just on that local repository :
git config pull.rebase false
pull
設置不變,並使用fetch
,然后是merge
或rebase
:git fetch
# after inspecting the remote, run either :
git merge @{u}
# or
git rebase @{u}
# '@{u}' is a shortcut for "the upstream branch of the current branch"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.