empty.html.haml 1.38 KB
Newer Older
1 2 3
- if current_user && can?(current_user, :download_code, @project)
  = render 'shared/no_ssh'

4
= render "home_panel"
5

6 7 8
.center.well
  %h3
    The repository for this project is empty
9
  %h4
10
    You can
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
11
    = link_to project_new_blob_path(@project, 'master'), class: 'btn btn-new btn-lg' do
12
      add a file
13
     or do a push via the command line.
14 15 16

%h4
  %strong Command line instructions
17 18
%div.git-empty
  %fieldset
Ben Bodenmiller's avatar
Ben Bodenmiller committed
19
    %legend Git global setup
20 21 22 23
    %pre.dark
      :preserve
        git config --global user.name "#{git_user_name}"
        git config --global user.email "#{git_user_email}"
24

25
  %fieldset
Ben Bodenmiller's avatar
Ben Bodenmiller committed
26
    %legend Create a new repository
27 28 29 30 31
    %pre.dark
      :preserve
        mkdir #{@project.path}
        cd #{@project.path}
        git init
Ben Bodenmiller's avatar
Ben Bodenmiller committed
32 33
        touch README.md
        git add README.md
34
        git commit -m "first commit"
35 36
        git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'clone')}
        git push -u origin master
37

38
  %fieldset
Ben Bodenmiller's avatar
Ben Bodenmiller committed
39
    %legend Push an existing Git repository
40 41 42 43 44
    %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
45

46 47 48
- if can? current_user, :remove_project, @project
  .prepend-top-20
    = link_to 'Remove project', @project, data: { confirm: remove_project_message(@project)}, method: :delete, class: "btn btn-remove pull-right"