Created
May 4, 2022 07:57
-
-
Save atlance/9a35f52f5cff0feb0c2abaf882e8697c to your computer and use it in GitHub Desktop.
Revisions
-
jonlong created this gist
Aug 12, 2013 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ ## Archive a GitHub Repository git clone --bare [email protected]:jonlong/<repo>.git tar -czf <repo>.git.tar.gz <repo>.git ## Deploy an Archived Repository to GitHub Create a new private repository on the target account: curl -F 'login=<user>' -F 'token=<token>' -F 'name=jonlong/<repo>' -F 'public=0' http://github.com/api/v2/json/repos/create Extract the archived repository: tar -xvzf <repo>.tar.gz Navigate to the bare repository: cd <repo>.git Push the repository to GitHub git push --mirror [email protected]:jonlong/<repo>.git