- 論壇徽章:
- 0
|
本帖最后由 yaoyansi 于 2011-04-21 15:21 編輯
Hi, 大家好
問題的背景是這樣的
1.A是一個(gè)github上的開源項(xiàng)目ReposA,使用git做代碼管理。
2.我現(xiàn)在要基于A開發(fā)一個(gè)項(xiàng)目B,
a)B基于A的r0版本的代碼(記為Ar0)開發(fā),
b)B需要改A的源代碼(A的這些被改動(dòng)的代碼文件記為AM)
c)A現(xiàn)在也在不斷更新,假設(shè)今后某一天A的版本r1(代碼記為Ar1).B需要將Ar1(相對于Ar0的)增加的代碼,更新到B里。
d)同時(shí)B還有我自己寫的新代碼文件(這些文件記為BM)
e)暫時(shí)不能把B提交到A的代碼庫里,只能在本地建立我的代碼服務(wù)器S和代碼庫ReposB,也就是說AM和BM不能提交到ReposA里。
f)可以肯定的是BM需要提交到ReposB里。
3.我對svn比較熟,搭建過svn服務(wù)器(win/linux);對于git,hg只用過客戶端(僅限于checkout),
4.開發(fā)環(huán)境是windows
問題如下:
1)該用svn,git,還是hg?如何管理?
2)AM應(yīng)該提交到哪里?
3)有沒有什么其他好的建議?
謝謝
------------------------------------------------------------
今天在學(xué)習(xí)git,使用TortoiseGit做了如下測試,同時(shí)也遇到一些問題:
測試步驟如下:
1.在本地d:\gittest\webserver\repos\建立代碼,建立分支branch0 (模擬ReposA)
2.在本地d:\gittest\localserver\repos\建立上述webserver的clone,
3.開發(fā)者user0 在d:\gittest\user0\repos\下clone localserver,在branch0做開發(fā),比如,增加一個(gè)文件user0_file0.txt
4.開發(fā)者user1 在d:\gittest\user1\repos\下clone localserver,在branch0做開發(fā),比如,增加一個(gè)文件user1_file0.txt
現(xiàn)在的問題是,如何把user0_file0.txt,user1_file0.txt 更新到d:\gittest\localserver\repos\下。
我在d:\gittest\user0\repos\下選擇“TortoiseGit”->push,點(diǎn)擊OK后會(huì)提示:- git.exe push --progress "origin" branch0 :branch0
- Counting objects: 3, done.
- Compressing objects: 100% (2/2)
- Writing objects: 100% (2/2)
- Writing objects: 100% (2/2), 243 bytes, done.
- remote: error: its current branch; however, this is not recommended unless youository to allow pushing intoch' configuration variable toinconsistentnch in a non-bare remote: remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.ep the default behaviour, set
- To D:\tmp\gittest\local_master\repos
- ! [remote rejected] branch0 -> branch0 (branch is currently checked out)
- error: failed to push some refs to 'D:\tmp\gittest\local_master2\repos'
復(fù)制代碼 |
|