“ git pull --rebase”和“ git fetch && git rebase --autostash FETCH_HEAD”之间是否有区别?

问题描述 投票:2回答:1

标题说明了一切。之间有什么区别:

git pull --rebase --autostash

git fetch && git rebase --autostash FETCH_HEAD

而当我们在它之间时:

git pull

git fetch && git merge

谢谢!

git git-merge git-rebase git-pull git-fetch
1个回答
1
投票

以下提到的命令

git pull --autostash

将存储您的本地更改,然后执行pull

pullfetchmerge的组合。fetch不会将远程更改合并到本地分支。因此,

git pull

类似于

git fetch && git merge

希望这可以回答您的查询。

© www.soinside.com 2019 - 2024. All rights reserved.