Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I started a new github repository online, and cloned it to my computer. I accidentally cloned it to an existing folder, and thus all existing files were deleted and replaced with the files from my repository.

Is there any way to restore the old files from that folder with a git 'trick', or should I really be worried and use a data recovery utility?

thanks for your answer.

p.s.: the files from the overwritten folder are not in my recycling bin either. I'm on a mac OS X.

share|improve this question

migrated from Dec 7 '12 at 8:28

This question came from our site for professional and enthusiast programmers.

up vote 0 down vote accepted

Time machine is your best bet, or some other backup.

Git only knows about files that it specifically tracks. If it's overwritten local files, it wasn't tracking them, so it can do nothing about restoring them for you.


share|improve this answer

You must log in to answer this question.