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.
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.
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
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).
@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.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs