Method: ProjectsHelper#push_to_create_project_command
- Defined in:
- app/helpers/projects_helper.rb
#push_to_create_project_command(user = current_user) ⇒ Object
348 349 350 351 352 353 354 355 356 357 358 |
# File 'app/helpers/projects_helper.rb', line 348 def push_to_create_project_command(user = current_user) repository_url = if Gitlab::CurrentSettings.current_application_settings.enabled_git_access_protocol == 'http' user_url(user) else Gitlab.config.gitlab_shell.ssh_path_prefix + user.username end "git push --set-upstream #{repository_url}/$(git rev-parse --show-toplevel | xargs basename).git " \ "$(git rev-parse --abbrev-ref HEAD)" end |