-1

I am using Mac, Xcode, and Git for development. On my Mac, there are some Xcode projects that are no longer needed and has already been deleted before. However, after I deleted those folders, they always come back couple hours later, with only .git folder inside each of them. Inside .git, there is an "objects" folder with many 2-digit number or letter named folders inside. How do I get rid of those project folders and make sure they never come back?

I have already tried cd to each of these folders and use rm -rf .git and rm -rf .git* to remove those .git folders, but still they came back.

None of these projects are on my github, so pretty sure that's not the cause.

Does anyone have similar issues?

Eric Leschinski
  • 146,994
  • 96
  • 417
  • 335
Ziming Li
  • 3
  • 2

1 Answers1

2

I encountered this issue before when deleting a project with Xcode still open.

Try this:

  1. In Xcode, Window -> Welcome to Xcode
  2. Check if the list of projects you want to delete are listed there
    • If they are, right-click on them then Show in Finder
      (This is to be sure you're deleting the correct project folder)
    • If they aren't listed there, then proceed to the next step
  3. In Xcode, File -> Open Recent -> Clear Menu
  4. Quit Xcode (make sure it's closed before deleting the project folders)
  5. In the opened Finder window, delete the top project folder (not just the .git folder)
    You can also do rm -rf on it on a terminal.
  6. Reopen Xcode
Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
  • Thank you for your help, I just followed your steps, will see if it works! – Ziming Li Jul 19 '17 at 00:49
  • Looks like some of the old projects has been removed successfully. Some still show up. I will try couple times and see if the rest of them can be deleted. Thanks again. – Ziming Li Jul 19 '17 at 18:15
  • @ZimingLi You can also try [deleting the derived data](https://stackoverflow.com/q/38016143/2745495) (though I didn't need to do this before). – Gino Mempin Jul 20 '17 at 00:58