Created
December 27, 2011 16:24
-
-
Save hlandry/1524244 to your computer and use it in GitHub Desktop.
Archive a repo and re-import it later.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Warning, this was only tested on small project that use only the main branch. use at your own risk... | |
# First clone your repo | |
$ git clone <some repo> | |
$ cd <some repo> | |
$ git remote -v | |
origin olduser@oldhost.com:OldRepoName.git (fetch) | |
origin olduser@oldhost.com:OldRepoName.git (push) | |
$ git remote rm origin | |
# Then archive. | |
# Some time later, when restarting to work on the project, create a blank repo in git hub and do : | |
$ git remote add origin git@github.com:YourUserName/NewRepoName.git | |
$ git push -u origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment