Is it possible to connect a project from IDEA to Gitlab? There are no problems with GitHub, you specify a github account, then VCS-> Import into and it creates a project in your account. But with GitLab I don't see such a possibility. Maybe there is some way? Or just manually throw it in there?
If all you want to do is create a project, that is as simple as pushing the repo. In GitLab, you don't have to create the project in the UI first. You can simply push directly to a project namespace that does not yet exist. The project will be created when you push to it.
Therefore, all you have to do is configure your git remote per usual, then push.
git init
git checkout -b main
echo "# My Project" > README.md
git add README.md
git commit -m "initial commit"
git push --set-upstream [email protected]:namespace/myproject.git main
Then you'll see the message from the remote in the git console log
remote: The private project namespace/myproject was created.
In the JetBrains IDEs, you can simply configure the remote and push.
You only have define the remote ahead of time in the terminal. For example:
git remote add origin [email protected]:namespace/project
Then in the IDE, when you go to push, you'll see the ability to push to the new remote/branch.
Then you'll also note in the git
tab console you'll see the message from the remote that the project has been created.
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