0
添加一個分支假設我們有一個資產項目,主和開發分支 和其他項目命名TheProject。如何遠離倉庫
我想遠程添加只有dev Assets項目的分支。
如果我想添加整個資產項目,我會做:
#Add a new remote URL pointing to the separate project that we're interested in
git remote add -f ASSETS [email protected]/assets.git
#Merge the Assets project into the local Git project
git merge -s ours --no-commit ASSETS/master
#Create a new directory called ASSETS, and copy the Git history of the Assets project into it
git read-tree --prefix=ASSETS/ -u ASSETS/master
#commit the changes to your master branch
git commit -m "Subtree merged in spoon-knife"
git push
但無論如何,那不是我所需要的。我認爲是這樣的:
git remote add -f ASSETS --single-branch dev [email protected]/assets.git
但是,如果它的工作,我不會問現在!有任何想法嗎?