I am newbie to gitlab. i have a git lab repository , I was asked to create a new branch and push code that i have(first time,i have code on my local pc).. I have verified lot of articles here and examples but not sure whehter i need all those different steps.
I have just gitbash installed on my pc and i have remote repository url and, have a folder where i have my code which needs to be added to that new branch
Can some one please help me setup steps please. My understanding i should perform below on my local pc is this correct ?
git config --global user.name "your_username"
git config --global user.email "your_email_address@example.com"
cd into directory where you have local code
git clone https://gitlab.com/gitlab-tests/sample-project.git
git init
git remote add origin <git@gitlab.com:username/projectpath.git
git checkout -b <name-of-branch>
git checkout <name-of-branch>
git add .
git commit -m "COMMENT TO DESCRIBE THE INTENTION OF THE COMMIT"
git push <remote> <name-of-branch>