Created
October 23, 2022 03:53
-
-
Save Pikachuxxxx/684ff5466ee9ebc69eeda40d9d8386dc to your computer and use it in GitHub Desktop.
Git add history to already cloned repo.txt
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
Grab the .git directory by cloning a bare repository | |
$ mkdir repo | |
$ git clone --bare http://github/user/repo repo | |
Make the .git directory and move the cloned files | |
$ mkdir repo/.git | |
$ mv repo/* repo/.git | |
Unzip the repository | |
$ unzip repo.zip | |
Re-initialize the repository | |
$ cd repo | |
$ git init | |
Verify you're sync'ed | |
$ git pull | |
Reset the HEAD to clean up the status | |
$ git reset HEAD |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment