I have created one project. I want to store my project in Gitlab. How to create a local repository and remote repository in Gitlab using command line? I am looking for creating both local repository and remote repository creation.
I got the solution. Steps to create Local repository and remote repository using Gitlab.
git init
(Local repository created)git add .
git commit -m "message"
git push --set-upstream [email protected]:your-username/nonexistent-project.git master
Git push using HTTP:
git push --set-upstream https://gitlab.example.com/your-username/nonexistent-project.git master
To add a new remote, use the git remote add command on the terminal, in the directory your repository is stored at. The git remote add command takes two arguments: A unique remote name, for example, “my_awesome_new_remote_repo”
Steps to create Local repository and remote repository using Gitlab.
git init
(Local repository created)git add .
git commit -m "message"
Git push using SSH(Remote repository created):
git push --set-upstream [email protected]:namespace/nonexistent-project.git master
Git push using HTTP:
git push --set-upstream https://gitlab.example.com/namespace/nonexistent-project.git master
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With