- Recently I lost my development machine due to an upgrade to Mountain Lion. Sadly I had not backed up before performing the upgrade but I did backup before taking the machine to have its OS fixed. Even after three trips to the Apple Store's "Genius Bar" ... it continued to be an epic failure because recovering from the time machine backups yielded the same unusable experience once again.
- I decided to recover the data piece by piece starting with my Git projects. I loaded the time machine file as a hard drive and copied the projects whole by dragging & dropping them into a similar file system location.
- But when I performed a simple integrity check such as "git status" it led to messages like: "fatal: Not a git repository git repository"
- Some basic searches led me to realize that I had to take a closer look at the .git directory in question:
-
First thing I realized was that my submodule that was causing trouble did not have a .git directory but had a .git file instead! Inside this file was a gitdir key and a path which redirected to a location in the parent git project.
gitdir: /Users/olduser/gitProjects/myParentProject/.git/modules/myChildProjectModule
-
Afterwards, the solution was simple. The path for gitdir had an old username in it, which did not represent the current folder structure. Simply correcting the username in the path of the recovered file to the current one, fixed the issue.
gitdir: /Users/currentUser/gitProjects/myParentProject/.git/modules/myChildProjectModule
Showing posts with label mountain lion. Show all posts
Showing posts with label mountain lion. Show all posts
Monday, August 20, 2012
Recovering Git Projects from Time Machine
Labels:
backup,
disk,
drive,
external,
git,
gitdir,
hard,
mountain lion,
recover,
time machine
Tuesday, August 14, 2012
Replacing X11 with XQuartz on Mountain Lion
- It is a bit of a surprise to realize that X11 is missing from your system after an upgrade to Mountain Lion. Apple does a good job of pointing the user to XQuartz but something critical is lacking!
- Apparently the installation (X11 2.7.2 - 2012.06.01 - First release supported on Mountain Lion) needs to be run twice in order for it to be successful.
- The first time it asks for a system restart after which the programs which are supposed to pick-up on and start using it are still asking dumb question like "Where is X11?"
- If you run the installation a second time though, it will now place an app called XQuartz in your system and you can launch it from Spotlight.
- Afterwards, you are no longer asked the question: "Where is X11?" ... the dependent applications simply work :)
Subscribe to:
Posts (Atom)