2015-01-24 02:14:26 +00:00
|
|
|
- if current_user && can?(current_user, :download_code, @project)
|
|
|
|
= render 'shared/no_ssh'
|
2015-02-13 12:33:28 +00:00
|
|
|
= render 'shared/no_password'
|
2015-01-24 02:14:26 +00:00
|
|
|
|
2013-11-06 15:13:21 +00:00
|
|
|
= render "home_panel"
|
2012-09-04 16:05:08 +00:00
|
|
|
|
2015-01-26 21:37:18 +00:00
|
|
|
.center.well
|
|
|
|
%h3
|
|
|
|
The repository for this project is empty
|
2015-01-27 19:32:28 +00:00
|
|
|
%h4
|
2015-01-26 21:37:18 +00:00
|
|
|
You can
|
2015-01-24 18:02:58 +00:00
|
|
|
= link_to namespace_project_new_blob_path(@project.namespace, @project, 'master'), class: 'btn btn-new btn-lg' do
|
2015-01-26 21:37:18 +00:00
|
|
|
add a file
|
2015-02-03 19:23:59 +00:00
|
|
|
or do a push via the command line.
|
2015-01-26 21:37:18 +00:00
|
|
|
|
|
|
|
%h4
|
|
|
|
%strong Command line instructions
|
2014-03-12 17:25:48 +00:00
|
|
|
%div.git-empty
|
|
|
|
%fieldset
|
2014-09-17 04:48:08 +00:00
|
|
|
%legend Git global setup
|
2014-03-12 17:25:48 +00:00
|
|
|
%pre.dark
|
|
|
|
:preserve
|
|
|
|
git config --global user.name "#{git_user_name}"
|
|
|
|
git config --global user.email "#{git_user_email}"
|
2012-01-17 23:19:57 +00:00
|
|
|
|
2014-03-12 17:25:48 +00:00
|
|
|
%fieldset
|
2014-09-17 04:48:08 +00:00
|
|
|
%legend Create a new repository
|
2014-03-12 17:25:48 +00:00
|
|
|
%pre.dark
|
|
|
|
:preserve
|
|
|
|
mkdir #{@project.path}
|
|
|
|
cd #{@project.path}
|
|
|
|
git init
|
2014-09-17 04:48:08 +00:00
|
|
|
touch README.md
|
|
|
|
git add README.md
|
2014-08-30 22:08:01 +00:00
|
|
|
git commit -m "first commit"
|
2014-03-12 17:25:48 +00:00
|
|
|
git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')}
|
|
|
|
git push -u origin master
|
2012-01-17 23:19:57 +00:00
|
|
|
|
2014-03-12 17:25:48 +00:00
|
|
|
%fieldset
|
2014-09-17 04:48:08 +00:00
|
|
|
%legend Push an existing Git repository
|
2014-03-12 17:25:48 +00:00
|
|
|
%pre.dark
|
|
|
|
:preserve
|
|
|
|
cd existing_git_repo
|
|
|
|
git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')}
|
|
|
|
git push -u origin master
|
2013-08-12 15:21:47 +00:00
|
|
|
|
2014-03-12 17:25:48 +00:00
|
|
|
- if can? current_user, :remove_project, @project
|
|
|
|
.prepend-top-20
|
2015-01-24 18:02:58 +00:00
|
|
|
= link_to 'Remove project', [@project.namespace.becomes(Namespace), @project], data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-remove pull-right"
|