簡體   English   中英

“git pull --rebase”和“git fetch && git rebase --autostash FETCH_HEAD”之間有區別嗎?

[英]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

pullfetchmerge的組合。 fetch不會將遠程更改合並到本地分支。 所以,

git pull

類似於

git fetch && git merge

希望這可以回答您的查詢。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM