Maury Markowitz
Maury Markowitz

Reputation: 9273

Where is the git repo under Xcode?

I'm trying to use BFG to remove a bad commit with a large file. All the documents talk about the "repo" which is a file/folder with a .git extension. But this does not appear to exist on my computer. Where does Xcode hide the repo?

Upvotes: 1

Views: 1143

Answers (2)

GoZoner
GoZoner

Reputation: 70135

If you are familiar with the 'Terminal' application then you can find the .git folder with:

$ cd /Users/.../<path-to-project-folder>
$ ls -a

as in

$ cd /Users/ebg/.../project-name
$ ls -a 
./      .DS_Store   .gitignore  aman/       ...
../     .git/       ...

Upvotes: 1

Swift Dev Journal
Swift Dev Journal

Reputation: 20088

The .git folder does exist. You can't see it because the Finder hides files and folders that start with a period, like the .git folder. There are utilities you can download to show hidden files in the Finder, like Show Hide Invisible Files. Or you can set it in the Terminal. A Google search for show hide invisible files mac brings up many articles on how to show hidden files in the Terminal, including the following:

Quickly Show/Hide Hidden Files on Mac OS X Mavericks

Where the .git folder resides depends on how you created your git repository. If you created an Xcode project and told Xcode to create a local repository, the .git folder will be inside your project folder.

Upvotes: 2

Related Questions