10
A
回答
6
克隆localy裸git倉庫(=服務器端回購),並推動它作爲鏡子新的回購協議:
git clone --bare http://my.gitlab.project.git
cd project.git
git push --mirror http://my.gogs.project.git
這將推動所有的提交,分支,標籤等,這將對於任何工作混帳回購協議,無論它是在gitlab,高格,github上託管等
6
鏡像回購正確的步驟是:
$ git的克隆--mirror [email protected]/upstream-repository。 git
$ CD上游repository.git
$混帳推--mirror [email protected]/new-location.git
注:不要使用git push --mirror
如果你不與git clone --mirror
克隆回購。此外,git clone --mirror
優於git clone --bare
,因爲它將克隆所有git筆記和屬性。
參考:http://blog.plataformatec.com.br/2013/05/how-to-properly-mirror-a-git-repository/
相關問題
- 1. Cassandra將int移植到bigint
- 2. 將Java移植到AS3
- 3. MONO:將.net移植到Linux。
- 4. 將jQuery移植到CoffeeScript?
- 5. 將ECLiPSe移植到Prolog
- 6. 將ExtJS3移植到ExtJS4
- 7. 將djangorestframework移植到2.X.X
- 8. 將pintOS移植到Raspberry-pi
- 9. 將jquery移植到java
- 10. 將LibPBC移植到Native Client?
- 11. 將wxPython移植到SWT/JFace
- 12. 將debian移植到leopord dm368
- 13. 將achartengine移植到Xamarin
- 14. 將Ruby移植到Python
- 15. 將Qt4移植到Qt5
- 16. 將sched.h移植到Windows中
- 17. 將時區移植到DateTimeZone
- 18. 將JVM移植到MINIX
- 19. 將isnan移植到C++ 11
- 20. 將eCos移植到i386
- 21. 將Groovy DSL移植到Clojure
- 22. 將PHP 5.2.14移植到Symbian
- 23. 將JavaScript庫移植到Python
- 24. 將Perl移植到Python
- 25. 將Android移植到BB 10
- 26. 將clock_gettime移植到窗口
- 27. 將Android 5.1.1移植到RaspbrryPi2
- 28. 將ARM移植到thumb2
- 29. 將問題移植到VxWorks
- 30. 將CakePHP1.3移植到2.0
保重! git push - 都不會推送標籤!你還必須添加git push --follow-tags! – rralf
是好言論!這就是爲什麼我用clone --bare和push --mirror編輯了答案 – PierreF