gitlab-org--gitlab-foss/app/views/projects/empty.html.haml

71 lines
2.5 KiB
Text
Raw Normal View History

- @content_class = "limit-container-width" unless fluid_layout
- @no_container = true
- breadcrumb_title _("Details")
2017-06-29 07:43:01 -04:00
= render partial: 'flash_messages', locals: { project: @project }
%div{ class: [container_class, ("limit-container-width" unless fluid_layout)] }
= render "home_panel"
%h4.prepend-top-0.append-bottom-8
= _('The repository for this project is empty')
- if @project.can_current_user_push_code?
%p.append-bottom-0
= _('You can create files directly in GitLab using one of the following options.')
.project-buttons.qa-quick-actions
= render 'stat_anchor_list', anchors: @project.empty_repo_statistics_buttons
2017-10-16 12:16:42 -04:00
- if can?(current_user, :push_code, @project)
.empty-wrapper.prepend-top-32
%h3#repo-command-line-instructions.page-title-empty
= _('Command line instructions')
%p
= _('You can also upload existing files from your computer using the instructions below.')
.git-empty.js-git-empty
%fieldset
%h5= _('Git global setup')
%pre.bg-light
:preserve
git config --global user.name "#{h git_user_name}"
git config --global user.email "#{h git_user_email}"
2012-01-17 18:19:57 -05:00
%fieldset
%h5= _('Create a new repository')
%pre.bg-light
:preserve
git clone #{ content_tag(:span, default_url_to_repo, class: 'js-clone')}
cd #{h @project.path}
touch README.md
git add README.md
git commit -m "add README"
- if @project.can_current_user_push_to_default_branch?
%span><
git push -u origin master
%fieldset
%h5= _('Push an existing folder')
%pre.bg-light
:preserve
cd existing_folder
git init
git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')}
git add .
git commit -m "Initial commit"
- if @project.can_current_user_push_to_default_branch?
%span><
git push -u origin master
%fieldset
%h5= _('Push an existing Git repository')
%pre.bg-light
:preserve
cd existing_repo
git remote rename origin old-origin
git remote add origin #{ content_tag(:span, default_url_to_repo, class: 'js-clone')}
- if @project.can_current_user_push_to_default_branch?
%span><
git push -u origin --all
git push -u origin --tags