How to remote git repository from xCode project completely and create new repository

Git keeps all of its files in the .git directory. Just remove that one and init again.

If you can’t find it, it’s because it is hidden.

  • In Windows 7, you need to go to your folder, click on Organize on the top left, then click on Folder and search options, then click on the View tab and click on the Show hidden files, folders and drives radio button.
  • On a Mac OS:
    • Open a Terminal (via Spotlight: press CMD + SPACE, type terminal and press Enter) and do this command: defaults write AppleShowAllFiles 1 && killall Finder.
    • Or you could also type cd (the space is important), drag and drop your git repo folder from Finder to the terminal window, press return, then type rm -fr .git, then return again.
  • On Ubuntu, use shortcut Ctrl + H.
To make new git repository first run  git init 

Leave a Reply

Your email address will not be published. Required fields are marked *