How to Create a New Gitlab Repo from My Existing Local Git Repo, Using Cli?
I Have Many Local Git Repos on My Osx. Using the Command Line I Want to Make New Gitlab Repositories on from Existing Local Repositories. Is It Possible to Do...
I have many local git repos on my OSX. Using the command line I want to make new gitlab repositories on from existing local repositories.
Is it possible to do that?
4 Answers
2018 Solution: just use --set-upstream
Assuming you'll take care of writing the script that would do the following for each of your local repo, it seems that as of Gitlab 10.5 you can simply use
# To your own domain
git push --set-upstream address/your-project.git
# To gitlab.com with SSH
git push --set-upstream :username/new-repo.git master
# To gitlab.com with HTTP
git push --set-upstream master
This will create a new project on Gitlab without you creating it manually on the server