我有一個名爲foo
的git分支。Git讀取並且不帶參數
> git status
# On branch foo
nothing to commit (working directory clean)
它最初簽出使用這個命令:
> git checkout origin/foo -b foo --track
我想從遠程倉庫獲得更新到這個分支。我知道這些命令的就足夠了:
> git fetch origin foo # ignore the lack of merging
> git pull origin foo
如果我忽略的參數fetch
或pull
,將默認的git獲取到(或拉動),我目前已簽出的分支?也就是說,下面的命令對等效嗎?
> git checkout foo
> git pull
和
> git checkout foo
> git pull origin foo
他們不是能完全等同 - - 請參閱我的答案瞭解詳情。 –