Missing instruction for a custom branch
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Problem to solve
Since we support Custom initial branch name. We do not have instruction to push to a custom branch in empty.html.haml
Further details
Git client creates default branch as master
. The customer has to change from master
branch to the customer branch example main
either by
git checkout -b main # creates the main branch from the command line, git client defaults to master
or by
git branch --move master main
Proposal
The proposal is to add another section to improve our instruction to help customers with custom branch push their code.
Example.
%fieldset
%h5= _('Push to a custom branch')
%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"
git branch --move master #{ default_branch_name }
- if @project.can_current_user_push_to_default_branch?
%span><
git push -u origin #{ default_branch_name }
Who can address the issue
Other links/references
Zendesk ticket (internal only)
Edited by 🤖 GitLab Bot 🤖