Git Add Another Remote to an Existing Repository: Difference between revisions
Jump to navigation
Jump to search
Line 14: | Line 14: | ||
git remote -v show | git remote -v show | ||
origin https | origin https://gogs-cicd.apps.openshift.novaordis.io/gogs/novaordis-session-servlet.git (fetch) | ||
origin https | origin https://gogs-cicd.apps.openshift.novaordis.io/gogs/novaordis-session-servlet.git (push) |
Revision as of 21:50, 11 December 2017
Internal
Overview
This article describes the procedure of adding a second remote to an existing repository. A practical situation when we would need something like this is when we developed an an application in an internal repository - for example a Gogs instance deployed within an OpenShift cluster - and we want to share the example in GitHub, while maintaining the internal repository fully operable. We start from a local repository fully synchronized with the Gogs repository:
git status On branch master Your branch is up-to-date with 'origin/master'. nothing to commit, working directory clean
git remote -v show origin https://gogs-cicd.apps.openshift.novaordis.io/gogs/novaordis-session-servlet.git (fetch) origin https://gogs-cicd.apps.openshift.novaordis.io/gogs/novaordis-session-servlet.git (push)