[urgent]Asking about restore local repo - sourceTree

Duc Nguyen January 15, 2015

Hi,

I'm suddenly delete the local repo that contain all of my code. Now all of my code is deleted, I do not know where the delete file go or any method that can help me to restore all the code.

Looking forward for all of your answer, it may save my life.

Thanks alot

1 answer

1 vote
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 15, 2015

Is your repo pushed anywhere, or has it been cloned by someone else? If so, you should be able to re-clone it from that location.

Did you delete the parent folder that holds your repository, or just all of it's contents? Navigate as close to where the project was as you can in Windows Explorer/Finder, and make sure your OS is set to show hidden folders. If there is a .git folder, then you should still have your repository, and you've just deleted your working copy.

If the .git folder is NOT there, then you'll need to look for a generic method of recovering deleted files (maybe your OS backs up some files automatically? There are also utilities to recover deleted files that work if the data hasn't been overwritten.

ChaudhryAbdullah February 25, 2015

Seth foss bro , i have the exact same problem . i am very much new to this source tree , what i did was that i created a repo without naming it and gave the path of My desktop , then i checked the box (unstaged files) , and i did pressed the commit button , and then i deleted the repo and (it said while deleting that files would be removed from disk , i checked that option ), after that all the files and folders of mine which were present at desktop vanished and now there's only folder remaining which you have mentioned is ".git" ,and it is of 8.5GB , and it contains objects . now sir can please tell me all the steps how to recover my files back in my desktop area as they were like before.. i would be very grateful thankue

ChaudhryAbdullah February 25, 2015

@Seth

ChaudhryAbdullah February 25, 2015

and i did not also do any remote,push,pull,clone operations

Duc Nguyen February 25, 2015

Hi, I'm not sure which IDE you are using but for my situation I using Pycharm for Python development, the way that I gather back my code is that I come to to the IDE ( Pycharm in this case) choose VCS then it was a local history tab where you can check the auto save create by the IDE and then you can choose to load from the particular auto save. If you are not using Pycharm I suggest that you go to Google and search how to to restore history with (Your IDE name).

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 26, 2015

@ChaudhryAbdullah You should always have a repo inside a dedicate folder. With SourceTree, open the Clone/Add Repo dialog, and choose the "Add Working Copy" tab. Put your desktop in the path. You should be able to checkout whatever branch you had committed to. Let me know if that works.

ChaudhryAbdullah February 27, 2015

@seth foss itrien very much everything but no avail , can you please give me your skype id , can you please help me with my problem by using sharing screens options in Skype?

ChaudhryAbdullah February 27, 2015

@Seth Foss

Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 27, 2015

If you can't load the repository, there's nothing I'm going to be able to do.

ChaudhryAbdullah February 27, 2015

how to load the repo ?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events