【发布时间】:2013-10-09 09:35:13
【问题描述】:
我在工作目录中找不到 .git/ 文件夹。我能够在 xcode 中执行源代码控制操作并能够查看提交历史记录。
.git 文件夹在哪里?
这是在 Xcode5 中。
【问题讨论】:
-
确保您能够查看隐藏文件。
-
隐藏文件,谢谢 RyPeck!
标签: xcode git location repository
我在工作目录中找不到 .git/ 文件夹。我能够在 xcode 中执行源代码控制操作并能够查看提交历史记录。
.git 文件夹在哪里?
这是在 Xcode5 中。
【问题讨论】:
标签: xcode git location repository
RyPeck 在上面的 cmets 中提供了正确答案。
隐藏文件是罪魁祸首。
终端中的以下命令可以解决这个问题:
defaults write com.apple.finder AppleShowAllFiles -bool true
【讨论】:
通过查找您可以在目录树中运行“git status”的距离来查找 git repo 的根目录。从那里,它应该是一个隐藏文件夹。
【讨论】:
完整的答案是设置 AppleShowAllFiles,然后重新启动 Finder,这在后来的 OSX 中从 Dock 中删除“重新启动”命令变得更加困难。
从 Launchpad 运行 Terminal 或使用 Spotlight 搜索,然后将其粘贴以关闭隐藏文件并重新启动 finder(重新启动所有窗口)
defaults write com.apple.finder AppleShowAllFiles -bool true
killall Finder /System/Library/CoreServices/Finder.app
然后粘贴它以再次隐藏它们。
defaults write com.apple.finder AppleShowAllFiles -bool false
killall Finder /System/Library/CoreServices/Finder.app
然后 git 存储库应该在 Finder 中可见,与您的 .xcodeproj 文件处于同一级别。
【讨论】: