Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Pikachuxxxx/684ff5466ee9ebc69eeda40d9d8386dc to your computer and use it in GitHub Desktop.
Save Pikachuxxxx/684ff5466ee9ebc69eeda40d9d8386dc to your computer and use it in GitHub Desktop.
Git add history to already cloned repo.txt
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