diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 077bccdad..9d545d89a 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -34,9 +34,9 @@
项目代码请设置好正确的编码方式(utf-8),否则中文会出现乱码
- -建立版本库文件夹,打开命令行执行如下:
+项目代码请设置好正确的编码方式(utf-8),否则中文会出现乱码。
+通过cmd命令提示符进入代码对应文件夹的根目录,假设当前用户的登录名为user,版本库名称为demo,需要操作的版本库分支为branch。 + 如果是首次提交代码,执行如下命令:
git init
@@ -46,19 +46,19 @@git commit -m "first commit"
git remote add origin - http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git + http://user_demo@repository.trustie.net/user/demo.git
git config http.postBuffer 524288000 #设置本地post缓存为500MB
-git push -u origin master:master
+git push -u origin branch:branch
已经有本地库,还没有配置远程地址,打开命令行执行如下:
git remote add origin http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git
+git remote add origin http://user_demo@repository.trustie.net/user/demo.git
git add .
@@ -66,14 +66,14 @@git config http.postBuffer 524288000 #设置本地post缓存为500MB
-git push -u origin master:master
+git push -u origin branch:branch
已有远程地址,创建一个远程分支,并切换到该分支,打开命令行执行如下:
git clone http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git
+git clone http://user_demo@repository.trustie.net/user/demo.git
git push
@@ -87,7 +87,7 @@git remote add trustie - http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git + http://user_demo@repository.trustie.net/user/demo.git
git add .
@@ -96,7 +96,7 @@git config http.postBuffer 524288000 #设置本地post缓存为500MB
-git push -u trustie master:master
+git push -u trustie branch:branch
李海提供