http://blog.csdn.net/pipisorry/article/details/50709014
?GitLab是利用 Ruby on Rails 一個開源的版本管理系統,實現一個自托管的Git項目倉庫,可通過Web界面進行訪問公開的或者私人項目。
它擁有與Github類似的功能,能夠瀏覽源代碼,管理缺陷和注釋。可以管理團隊對倉庫的訪問,它非常易于瀏覽提交過的版本并提供一個文件歷史庫。git代碼管理工具?團隊成員可以利用內置的簡單聊天程序(Wall)進行交流。它還提供一個代碼片段收集功能可以輕松實現代碼復用,便于日后有需要的時候進行查找。在線DEMO
出錯:There was an error with the recaptcha code below. Please re-enter the code:?
Because recaptcha is provided by google, but it is blocked in China, so you probably need VPN in order to get the code.
recaptcha就是這個驗證碼,類似12306,需要翻墻才能看到。git查看當前代碼版本號?
之后就可以看到gitlab相關的功能了。
在gitlab上創建一個項目
安裝git并配置本地git[Git版本控制教程 - Git本地倉庫]
配置遠程設置[Git版本控制教程 - Git遠程倉庫]
這樣就可以通過git push -u origin master提交代碼了
[GitLab版本管理]
皮皮Blog
國內較好的代碼托管平臺有coding.net等
注冊coding.net? Git 代碼托管 - Coding.net
coding上創建項目
可以創建私人項目和公有項目
私人項目不僅保密還有更多功能,如上傳文件到文件夾中的功能。公有項目只能將word文檔也加入到git管理中來上傳文件。git版本管理流程規范?不過私有項目只能創建10個,多了要付費。
安裝git
配置本地git并提交
pika:/media/pika/files/mine/python_workspace/RecSys/TianChi$
$ git init
$ git config --global user.name "pipilove"
$ git config --global user.email "***@126.com"
$ git add .
$ git commit -m 'init commit'
[Git版本控制教程 - Git本地倉庫]
遠程ssh-rsa公鑰配置
$ssh-keygen -t rsa -C "***@126.com"
設置SSH-RSA公鑰內容:賬戶》ssh公鑰》填上任意Title(如pipi ubuntu) > 在Key文本框里粘貼id_rsa.pub文件(pika:~$ ? ?cat .ssh/id_rsa.pub?)的內容 > “Add Key”
$git remote add origin git@gitlab.com:***.git??? #git地址在項目>代碼>SSH 方式訪問倉庫:copy
Note: git變更項目地址: git remote set-url origin git@***.git; ?查看git提交和拉取地址:?$ git remote -v; ?查看git配置:git config?--list
$git push -u origin master ? ? #這樣就可以通過git push -u origin master提交代碼了
多分支處理
$git branch dev
$git merge dev
$git checkout dev
$git push origin dev
這時最好就處在dev分支上進行代碼開發
添加項目好友:成員》項目成員添加+》馬上邀請好友》你的專屬邀請鏈接》發給項目其它成員進行注冊。成員注冊完成后會自動關注項目管理者,項目管理者要在成員添加的粉絲中添加這個好友就可以了。
如成員已注冊直接在 成員》項目成員添加+》添加郵箱搜索再添加進來就可以了。
注冊coding.net:上面項目管理者發的注冊鏈接。
等待項目所有者添加你到上面創建的項目中安裝git
遠程ssh-rsa公鑰配置:
$ssh-keygen -t rsa -C "***@126.com"
設置SSH-RSA公鑰內容:coding賬戶》ssh公鑰》填上任意Title(如pipi ubuntu) > 在Key文本框里粘貼id_rsa.pub文件(pika:~$ ? ?cat .ssh/id_rsa.pub?)的內容 > “Add Key”
創建一個代碼存放目錄,再拉取運程coding項目中已存在分區:git pull origin dev
[Git版本控制教程 - Git遠程倉庫]
注意:coding上傳文件大小沒有100m限制,不過每個免費的項目代碼加起來不能超過1G。超過1G會報錯:
Coding.net Tips : [Repo size exceeded quota : 1024M. See https://coding.net/upgrade for more details.]
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Coding.net部署公鑰
如果只是想讓別人看而不是上傳,可以使用部署公鑰。部署公鑰用以部署項目,只擁有只讀權限,且不能跟個人公鑰通用。
部署公鑰在:項目》設置》部署公鑰》新建》填上任意Title(如pipi ubuntu) > 在Key文本框里粘貼id_rsa.pub文件的內容 > “Add Key”
git push會出錯:$git push -u origin master
Coding.net Tips : [Deploy key is not allowed to push!]
fatal: Could not read from remote repository.
Please make sure you have the correct access rights?and the repository exists.
Deploy keys only have read-only access to the repo. If you wish to push, you need to add an SSH key to your user and make sure git is using that key, not the deploy key.
[coding doc]
from:?http://blog.csdn.net/pipisorry/article/details/50709014
ref:
版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。
工作时间:8:00-18:00
客服电话
电子邮件
admin@qq.com
扫码二维码
获取最新动态