2018-06-15 07:58:25 -04:00
|
|
|
- @content_class = "limit-container-width" unless fluid_layout
|
2021-02-17 13:09:19 -05:00
|
|
|
- default_branch_name = @project.default_branch_or_master
|
2020-11-19 01:09:07 -05:00
|
|
|
- @skip_current_level_breadcrumb = true
|
2016-01-14 15:44:20 -05:00
|
|
|
|
2017-06-29 07:43:01 -04:00
|
|
|
= render partial: 'flash_messages', locals: { project: @project }
|
2015-10-17 02:33:49 -04:00
|
|
|
|
2020-09-10 11:09:10 -04:00
|
|
|
= render "home_panel"
|
2012-09-04 12:05:08 -04:00
|
|
|
|
2020-12-14 22:10:12 -05:00
|
|
|
= render "invite_members" if experiment_enabled?(:invite_members_empty_project_version_a) && can_import_members?
|
|
|
|
|
2020-09-10 11:09:10 -04:00
|
|
|
%h4.gl-mt-0.gl-mb-3
|
|
|
|
= _('The repository for this project is empty')
|
2018-02-02 16:50:09 -05:00
|
|
|
|
2020-09-10 11:09:10 -04:00
|
|
|
- if @project.can_current_user_push_code?
|
2020-10-12 05:08:38 -04:00
|
|
|
%p
|
2020-09-10 11:09:10 -04:00
|
|
|
= _('You can get started by cloning the repository or start adding files to it with one of the following options.')
|
2018-02-02 16:50:09 -05:00
|
|
|
|
2020-09-10 11:09:10 -04:00
|
|
|
.project-buttons.qa-quick-actions
|
|
|
|
.project-clone-holder.d-block.d-md-none.mt-2.mr-2
|
|
|
|
= render "shared/mobile_clone_panel"
|
2020-01-29 13:08:47 -05:00
|
|
|
|
2020-10-08 05:08:40 -04:00
|
|
|
.project-clone-holder.d-none.d-md-inline-block.mb-2.mr-2.float-left
|
2020-09-10 11:09:10 -04:00
|
|
|
= render "projects/buttons/clone"
|
2020-09-29 14:09:52 -04:00
|
|
|
= render 'stat_anchor_list', anchors: @project.empty_repo_statistics_buttons, project_buttons: true
|
2017-10-16 12:16:42 -04:00
|
|
|
|
2020-09-10 11:09:10 -04:00
|
|
|
- if can?(current_user, :push_code, @project)
|
2020-10-12 05:08:38 -04:00
|
|
|
.empty-wrapper.gl-mt-4
|
2020-09-10 11:09:10 -04:00
|
|
|
%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
|
|
|
|
2020-09-10 11:09:10 -04: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 #{ default_branch_name }
|
2013-08-12 11:21:47 -04:00
|
|
|
|
2020-09-10 11:09:10 -04:00
|
|
|
%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 #{ default_branch_name }
|
2016-03-29 17:51:31 -04:00
|
|
|
|
2020-09-10 11:09:10 -04:00
|
|
|
%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
|
2021-02-17 13:09:19 -05:00
|
|
|
|
|
|
|
- if @project.empty_repo_upload_experiment?
|
|
|
|
= render 'projects/blob/upload', title: _('Upload New File'), placeholder: _('Upload New File'), button_title: _('Upload file'), form_path: project_create_blob_path(@project, default_branch_name), ref: default_branch_name, method: :post
|