Gerrit 添加一個已經有的git工程到gerrit服務器

The other alternative is if you already have a git project that you want to try out Gerrit on. First you have to create the project. This is done via the SSH port:

首先創建這個項目

  user@host:~$ ssh -p 29418 user@localhost gerrit create-project --name demo-project
  user@host:~$

You need to make sure that at least initially your account is granted "Create Reference" privileges for the refs/heads/* reference. This is done via the web interface in the Admin/Projects/Access page that correspond to your project.

After that it’s time to upload the previous history to the server:

把數據傳到新建立的git倉庫中去

  user@host:~/my-project$ git push ssh://user@localhost:29418/demo-project *:*
  Counting objects: 2011, done.
  Writing objects: 100% (2011/2011), 456293 bytes, done.
  Total 2011 (delta 0), reused 0 (delta 0)
  To ssh://user@localhost:29418/demo-project
   * [new branch]      master -> master
  user@host:~/my-project$

This will create a repository that you can clone to work with.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章