From 6b7a17de8c72a0d9b4110e43aa2e6dbdbf53c09c Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 5 May 2015 14:11:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93Git=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/repositories/show.html.erb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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

李海提供