diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 5f279f2c2..cbb899db3 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -29,78 +29,78 @@

-
展开Git操作指南
-
-
-
-

git 克隆和提交的用户名和密码为登录用户名和密码

-

项目代码请设置好正确的编码方式(utf-8),否则中文会出现乱码。

-

通过cmd命令提示符进入代码对应文件夹的根目录, - 如果是首次提交代码,执行如下命令:

-
-
-

git init

- -

git add *

- -

git commit -m "first commit"

- -

git remote add origin - <%= @repos_url %> -

- -

git config http.postBuffer 524288000 #设置本地post缓存为500MB

- -

git push -u origin master

-
- -
-

已经有本地库,还没有配置远程地址,打开命令行执行如下:

-
-
-

git remote add origin <%= @repos_url %>

- -

git add .

- -

git commit -m "first commit"

- -

git config http.postBuffer 524288000 #设置本地post缓存为500MB

- -

git push -u origin master

-
- -
-

已有远程地址,创建一个远程分支,并切换到该分支,打开命令行执行如下:

-
-
-

git clone <%= @repos_url %>

- -

git push

- -

git checkout -b branch_name

- -

git push origin branch_name

-
- -
-

从网上获取别人的开源版本库,转交到trustie网站上,打开命令行执行如下:

-
-
-

git remote add trustie - <%= @repos_url %> -

- -

git add .

- -

git commit -m "first commit"

- -

git config http.postBuffer 524288000 #设置本地post缓存为500MB

- -

git push -u trustie branch:branch

- -

李海提供

-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <% if !@entries.nil? && authorize_for('repositories', 'browse') %> <%= render :partial => 'dir_list' %> diff --git a/public/javascripts/project.js b/public/javascripts/project.js index 3553b4cef..c74ff18bf 100644 --- a/public/javascripts/project.js +++ b/public/javascripts/project.js @@ -96,29 +96,29 @@ function show_more_reply1(contentid, id2, id3) { } } //项目版本库git帮助文档显示 -function showhelpAndScrollTo(id) { - $('#' + id).toggle(); - if(cookieget("repositories_visiable") == "true") - { - cookiesave("repositories_visiable", false,'','',''); - } - else - { - cookiesave("repositories_visiable", true,'','',''); - } - var information = $("#showgithelp"); - var val = information.attr("value"); - if(val=="show_help") - { - $("#showgithelp").text("收起Git操作指南"); - information.attr("value", "hide_help"); - } - else - { - $("#showgithelp").text("展开Git操作指南"); - information.attr("value", "show_help"); - } -} +//function showhelpAndScrollTo(id) { +// $('#' + id).toggle(); +// if(cookieget("repositories_visiable") == "true") +// { +// cookiesave("repositories_visiable", false,'','',''); +// } +// else +// { +// cookiesave("repositories_visiable", true,'','',''); +// } +// var information = $("#showgithelp"); +// var val = information.attr("value"); +// if(val=="show_help") +// { +// $("#showgithelp").text("收起Git操作指南"); +// information.attr("value", "hide_help"); +// } +// else +// { +// $("#showgithelp").text("展开Git操作指南"); +// information.attr("value", "show_help"); +// } +//} function showhelpAndScrollToMessage(id, id1, count) { $('#' + id).toggle(); if(cookieget("repositories_visiable") == "true")