Moving Repositories from GIT to GIT
Moving Code Repositories from GIT to GIT
Use this article if you want to move a GIT repository and retain your branches and tags. Proudly adapted from this github.com help article. This document was generated migrating a repo from vanilla git to stash.
- a source git repository
- a blank destination git repository
- Clone bare from a temporary working directory
- git clone --bare https://YourUserName@code.lds.org/git/stack-db-migrator
- cd into the newly created repo...
- cd stack-db-migrator.git
- delete the temporary working directory and clone the project from it's new home
- or keep the project and reset the remote
- git remote set-url origin https://YourUserName@code.ldschurch.org/stash/scm/stja/stack-db-migrator.git
- change the URL in your build systems
- check remote status with git remote -v
- delete your old repo before somone commits code there
- you communicated the change a long time ago right?
- the build team has a wiki article on the topic