我在使用Git設置看似簡單的工作流時遇到了問題。簡單的Git工作流程
說我有兩個開發人員,DevA和DevB。有一個名爲'origin'的開發人員可以訪問的遠程倉庫。
德瓦創建從 '主' 的一個分支...
git checkout -b 'newbranch'
德瓦進行更改newbranch並提交
git add .
git commit -m 'newbranch changes'
德瓦推動改變原產
git push --all
發展局想要分支機構
git fetch --all
發展局希望在newbranch工作
git checkout newbranch
git pull newbranch
發展局進行了更改newbranch並將更改原產
git add .
git commit -m 'message'
git push --all
德瓦需要從遠程的變化,並得到...
git checkout newbranch
git pull --all
You asked to pull from the remote '--all', but did not specify
a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command line.
然後...
git branch -r
origin/newbranch
origin/HEAD -> origin/master
origin/master
然後...
git pull origin/newbranch
fatal: 'origin/newbranch' does not appear to be a git repository
fatal: Could not read from remote repository.
有人能告訴我這裏有什麼問題?
好像正確的工作流程。你得到什麼錯誤? – 2014-10-17 20:30:07
我澄清了包括一些錯誤的問題。 – 2014-10-17 20:43:19
不要使用'git pull --all',只需使用'git pull',並注意它只能從追蹤分支中運行。你可以看到'git branch -vv'的跟蹤信息。 – 2014-10-17 20:44:17