[英]What is the difference between git pull and git fetch + git rebase?
[英]Is there a difference between “git pull --rebase” and “git fetch && git rebase --autostash FETCH_HEAD”?
標題說明了一切。 有沒有區別:
git pull --rebase --autostash
和
git fetch && git rebase --autostash FETCH_HEAD
?
當我們在做的時候,在:
git pull
和
git fetch && git merge
?
謝謝!
下面提到的命令
git pull --autostash
將存儲您的本地更改,然后執行pull
。
pull
是fetch
和merge
的組合。 fetch
不會將遠程更改合並到本地分支。 所以,
git pull
類似於
git fetch && git merge
希望這可以回答您的查詢。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.