2011-10-21 14:35:42 +02:00
|
|
|
<% bash_lexer = Pygments::Lexer[:bash] %>
|
2011-10-08 23:36:38 +02:00
|
|
|
<div class="">
|
|
|
|
<div class="git-empty">
|
|
|
|
<h2>Git global setup:</h2>
|
|
|
|
<% setup_str = <<eos
|
|
|
|
git config --global user.name "#{current_user.name}"
|
|
|
|
git config --global user.email "#{current_user.email}"
|
|
|
|
eos
|
|
|
|
%>
|
2011-10-21 14:35:42 +02:00
|
|
|
<%= raw bash_lexer.highlight(setup_str) %>
|
2011-10-08 23:36:38 +02:00
|
|
|
<br />
|
|
|
|
<br />
|
|
|
|
<h2>Next steps:</h2>
|
|
|
|
<% repo_setup_str = <<eos
|
|
|
|
mkdir #{@project.path}
|
|
|
|
cd #{@project.path}
|
|
|
|
git init
|
|
|
|
touch README
|
|
|
|
git add README
|
|
|
|
git commit -m 'first commit'
|
|
|
|
git remote add origin #{@project.url_to_repo}
|
|
|
|
git push -u origin master
|
|
|
|
eos
|
|
|
|
%>
|
2011-10-21 14:35:42 +02:00
|
|
|
<%= raw bash_lexer.highlight(repo_setup_str) %>
|
2011-10-08 23:36:38 +02:00
|
|
|
|
|
|
|
<br /><br />
|
|
|
|
<h2>Existing Git Repo?</h2>
|
|
|
|
<% exist_repo_setup_str = <<eos
|
|
|
|
cd existing_git_repo
|
2011-10-28 10:34:30 +02:00
|
|
|
git remote add origin #{@project.url_to_repo}
|
2011-10-08 23:36:38 +02:00
|
|
|
git push -u origin master
|
|
|
|
eos
|
|
|
|
%>
|
2011-10-21 14:35:42 +02:00
|
|
|
<%= raw bash_lexer.highlight(exist_repo_setup_str) %>
|
2011-10-08 23:36:38 +02:00
|
|
|
|
|
|
|
<br /><br />
|
|
|
|
<h2>Remove this project?</h2>
|
|
|
|
<div class="error">
|
|
|
|
<p>
|
|
|
|
Be careful! <br/>
|
|
|
|
Project cant be recovered after destroy.</p>
|
2011-10-26 15:46:25 +02:00
|
|
|
<%= link_to 'Destroy', @project,
|
2011-10-08 23:36:38 +02:00
|
|
|
:confirm => 'Are you sure?', :method => :delete,
|
|
|
|
:class => "left button negative span-6", :style => "text-align:center" %>
|
|
|
|
<div class="clear"></div>
|
|
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
</div>
|
|
|
|
</div>
|