/
Revert Corrupted Repo To Previous Version

Revert Corrupted Repo To Previous Version

Issue

  • You want to view git logs from a client’s IguanaMainRepo

  • Revert to a previous commit if IguanaMainRepo has been corrupted

Solution

Oftentimes, Iguana will need to get rebuilt if the repository has been corrupted. Refer to case 1 - if Iguana is still having issues restarting, refer to case 2.

Case 1: Quick Rebuild (No need to use git)

  1. Backup the “edit” and “IguanaConfigurationRepo”

  2. Stop Iguana service

  3. Delete the edit, run, and IguanaConfigurationRepo folders

  4. Restart Iguana

This method deletes the problem folders but does not touch other files in the working directory. These folders will get rebuilt using the IguanaMainRepo on startup.

Case 2: Rebuild (Reverting to a previous commit)

You can view the logs using the Mac/Windows program SourceTree, but you will need a cloned IguanaMain repo. Run the following command with git or in git bash:

You can now import the cloned repo in SourceTree and view the git history.

If you want to revert IguanaMainRepo to the previous commit, cd into the IguanaMainRepo and run:
git update-ref HEAD HEAD^

Once the IguanaMainRepo has been reverted to a previous commit, follow the steps to rebuild Iguana:

  1. Backup the Iguana Installation/ working directory

  2. Stop Iguana service

  3. Delete the IguanaMainRepo, edit, run, and IguanaConfigurationRepo folders

  4. Insert the reverted IguanaMainRepo into the working/installation directory

  5. Restart the Iguana Service

Refer to Video:

 

Empty Repo Error

If you get the error “warning: You appear to have cloned an empty repository.” it means that the IguanaMainRepo’s git has been corrupted:

If you rebuild Iguana using this repo, you will get a service error log “Local push doesn't (yet) support pushing to non-bare repos.” and Iguana will rebuild from scratch.

You can try:

  1. Rebuilding Iguana using both the IguanaMainRepo and IguanaConfigurationRepo

  2. Sync the repositories from the <iguana>:<port>/debug

  3. Stop Service

  4. Try the git clone command

If it still does not work, reach out to the development team. In #36283 Obner was unable to git clone using Git Bash and Linux git but John was able to using Mac terminal.

Related content

How to Recover Iguana after CrowdStrike Microsoft Outage
How to Recover Iguana after CrowdStrike Microsoft Outage
Read with this
Quick Rebuilding Corrupted Iguana Repo Solutions
Quick Rebuilding Corrupted Iguana Repo Solutions
More like this
No affiliate links giving commissions
No affiliate links giving commissions
Read with this
Common IguanaMainRepo Corruption Cases
Common IguanaMainRepo Corruption Cases
More like this
Ergonomic Accessories
Ergonomic Accessories
Read with this
Iguana Repo Corruption
Iguana Repo Corruption
More like this