if I create a new gitlab project, I have the option of importing an existing repo. But I do not believe that gitlab actually clones the repo as git remote -v shows no output.
So if a local repo already exists, perhaps by cloning, is it possible to tell gitlab to use that repo for the project and not create a new repo?
Remember in git … your local repo is the main repo. Everyone else is a potentially out of date repository. This is unlike most other systems.
To answer your question, you can have as many remotes in your repo as you like … in a non-master-client setup like the original design of git each developer had every other developer as a remote since they didn’t want to have a “master” repo. You just pulled in whatever you needed/wanted from whomever had it.
To push an existing repository that you have clone from elsewhere to gitlab. I’m going to name the remote ‘gitlab’ but you can use any name that is not already used.
# git remote add gitlab <url>
# git push <branch> gitlab
Hi Aram, thanks for replying.
I would say that my local repo is not the main repo. The main repo is the repo that deliveries and releases are made from. Yes, every repo is going to be different as changes are made and before they are pushed. But they are local repos.