Answers for "push code to gitlab using git commandas"

1

how to push code to gitlab

cd existing_repo
git init
git remote add origin https://gitlab.com/your_account_name/project_name.git
git branch -M main
git add .
git commit -m "Initial commit"
git push -uf origin main
Posted by: Guest on December-16-2021
3

how to push local code to gitlab

## Git push using SSH
git push --set-upstream [email protected]:namespace/nonexistent-project.git master

## Git push using HTTPS
git push --set-upstream https://gitlab.example.com/namespace/nonexistent-project.git master
Posted by: Guest on May-28-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language