We are working on project where the client uses github as their repository. The client created an id for me and asked me to fork the project and push all the changes in my fork and create a pull request for the changes to be pushed to the main branch. This works fine.
But I manage a team of developers and no one has access to the github repo but me. So I have to collate all the changes and push it in to the github fork all the time.
But within our company we do have a gitlab license and we can create our repositories to which all our developers will have to access to it.
So my question is how do I create a link between the gitlab repo to github repo? How do I push the changes from my gitlab to github repo?
Add a new remote with the url of github-repo into your gitlab-repo then push the changes to github-repo.
Go into gitlab repo then add a new remote (say, github-repo) with the URL of github repo.
# go into your gitlab repo
$ git remote add github-repo <github-repo-url>
Push gitlab repo's master branch changes to github repo's master branch.
$ git checkout master
$ git push github-repo master # push gitlab-repo master branch changes to github-repo master branch
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