|
|
|
@ -8,55 +8,80 @@
|
|
|
|
|
:locals => {:path => @path, :kind => 'dir', :revision => @rev} %>
|
|
|
|
|
<%= render :partial => 'navigation' %>
|
|
|
|
|
|
|
|
|
|
</div><!--contextual end-->
|
|
|
|
|
</div>
|
|
|
|
|
<!--contextual end-->
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class=" c_dark f14">
|
|
|
|
|
<p > <%if @repository.type.to_s=="Repository::Git"%>
|
|
|
|
|
<p>
|
|
|
|
|
<% if @repository.type.to_s=="Repository::Git" %>
|
|
|
|
|
<%= @repos_url %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= h @repository.url %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</p>
|
|
|
|
|
<p class="mb10 word_break">
|
|
|
|
|
|
|
|
|
|
<p class="mb10 break_word">
|
|
|
|
|
(<%= l(:label_all_revisions) %><%= @repositories.sort.collect { |repo|
|
|
|
|
|
link_to h(repo.name),
|
|
|
|
|
{:controller => 'repositories', :action => 'show',
|
|
|
|
|
:id => @project, :repository_id => repo.identifier_param, :rev => nil, :path => nil},
|
|
|
|
|
:class => 'repository' + (repo == @repository ? ' selected' : ''),
|
|
|
|
|
:class => "mb10 word_break c_orange"}.join(' | ').html_safe %>)
|
|
|
|
|
:class => "mb10 break_word c_orange" }.join(' | ').html_safe %>)
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="repos_more"><a id="showgithelp" value="show_help" onclick ="showhelpAndScrollTo('repos_git_more','repos_git_more'); return false;" class="c_dblue">显示Git操作指南</a></div>
|
|
|
|
|
<div id="repos_git_more" style="display:none;">
|
|
|
|
|
<br>
|
|
|
|
|
<div class=" c_dark f14">
|
|
|
|
|
<p>项目代码请设置好正确的编码方式(utf-8),否则中文会出现乱码</p>
|
|
|
|
|
|
|
|
|
|
<p>建立版本库文件夹,打开命令行执行如下:</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="repos_explain">
|
|
|
|
|
<p>git init</p>
|
|
|
|
|
|
|
|
|
|
<p>git add *</p>
|
|
|
|
|
|
|
|
|
|
<p>git commit -m "first commit"</p>
|
|
|
|
|
|
|
|
|
|
<p>git remote add origin
|
|
|
|
|
http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
|
|
|
|
|
|
|
|
|
|
<p>git push -u origin master:master</p>
|
|
|
|
|
</div><!--repos_explain end-->
|
|
|
|
|
</div>
|
|
|
|
|
<!--repos_explain end-->
|
|
|
|
|
<div class="c_dark f14">
|
|
|
|
|
<p>已经有本地库,还没有配置远程地址,打开命令行执行如下:</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="repos_explain">
|
|
|
|
|
<p>git remote add origin http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git</p>
|
|
|
|
|
|
|
|
|
|
<p>git add .</p>
|
|
|
|
|
|
|
|
|
|
<p>git commit -m "first commit"</p>
|
|
|
|
|
|
|
|
|
|
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
|
|
|
|
|
|
|
|
|
|
<p>git push -u origin master:master</p>
|
|
|
|
|
</div><!--repos_explain end-->
|
|
|
|
|
</div>
|
|
|
|
|
<!--repos_explain end-->
|
|
|
|
|
<div class="c_dark f14">
|
|
|
|
|
<p>已有远程地址,创建一个远程分支,并切换到该分支,打开命令行执行如下:</p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="repos_explain">
|
|
|
|
|
<p>git clone http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git</p>
|
|
|
|
|
|
|
|
|
|
<p>git push</p>
|
|
|
|
|
|
|
|
|
|
<p>git checkout -b branch_name</p>
|
|
|
|
|
|
|
|
|
|
<p>git push origin branch_name</p>
|
|
|
|
|
</div><!--repos_explain end-->
|
|
|
|
|
</div>
|
|
|
|
|
<!--repos_explain end-->
|
|
|
|
|
<div class="c_dark f14">
|
|
|
|
|
<p>从网上获取别人的开源版本库,转交到trustie网站上,打开命令行执行如下:</p>
|
|
|
|
|
</div>
|
|
|
|
@ -64,13 +89,18 @@
|
|
|
|
|
<p>git remote add trustie
|
|
|
|
|
http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
<p>git add .</p>
|
|
|
|
|
|
|
|
|
|
<p>git commit -m "first commit"</p>
|
|
|
|
|
|
|
|
|
|
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
|
|
|
|
|
|
|
|
|
|
<p>git push -u trustie master:master</p>
|
|
|
|
|
|
|
|
|
|
<p><a href="/users/646" class="c_orange">李海</a>提供</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<% if !@entries.nil? && authorize_for('repositories', 'browse') %>
|
|
|
|
|
<%= render :partial => 'dir_list' %>
|
|
|
|
|
<% end %>
|
|
|
|
@ -119,6 +149,7 @@
|
|
|
|
|
<p class="fb c_dark mt10">查看如何提交代码:
|
|
|
|
|
<%= link_to(l(:label_how_commit_code_chinese), ch_usage_path, :class => "c_blue") %>
|
|
|
|
|
<%= link_to('English', en_usage_path, :class => "c_blue") %>
|
|
|
|
|
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|