2016-06-07 115 views
1

自從我升級git(Im在2.8.1版本中)以來,此錯誤開始出現。不是git存儲庫:子文件夾中的'.git'錯誤

我可以在任何存儲庫(github或bitbucket)中複製它。本質上,如果回購有一個子目錄,git命令無法將其識別爲有效的git回購。

enter image description here

mus文件夾的內容:

➜ shinylang git:(master) ls -la mus 
total 8 
drwxr-xr-x 3 sandeep staff 102 Jun 7 10:32 . 
drwxr-xr-x 5 sandeep staff 170 Jun 7 10:32 .. 
-rw-r--r-- 1 sandeep staff 3523 Jun 7 10:32 compiler.js 

這裏的測試GitHub庫https://github.com/csandeep/shinylang

我的.gitconfig

[user] 
    email = [email protected]########## 
    name = Sandeep Chayapathi 

[alias] 
     co = checkout 
     st = status 
[core] 
    excludesfile = /Users/sandeep/.gitignore_global 
    editor = mate -wl1 
    trustctime = false 
[difftool "sourcetree"] 
    cmd = /Users/sandeep/Applications/Perforce/p4merge.app/Contents/MacOS/p4merge \"$LOCAL\" \"$REMOTE\" 
    path = 
[mergetool "sourcetree"] 
    cmd = /Users/sandeep/Applications/Perforce/p4merge.app/Contents/MacOS/p4merge \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\" 
    trustExitCode = true 
[merge] 
    conflictstyle = diff3 
    tool = sourcetree 
[rerere] 
    enabled = false 
[mergetool "Kaleidoscope"] 
    cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot 
    trustexitcode = true 
[difftool "Kaleidoscope"] 
    cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\" 
[mergetool "p4mergetool"] 
    cmd = /Users/sandeep/Applications/Perforce/p4merge.app/Contents/Resources/launchp4merge \"$PWD/$BASE\" \"$PWD/$REMOTE\" \"$PWD/$LOCAL\" \"$PWD/$MERGED\" 
    trustExitCode = false 
[difftool "p4mergetool"] 
    cmd = /Users/sandeep/Applications/Perforce/p4merge.app/Contents/Resources/launchp4merge \"$LOCAL\" \"$REMOTE\" 
[mergetool] 
    prompt = false 
    keepBackup = false 
    trustExitCode = false 
[diff] 

[mergetool "extMerge"] 
    cmd = extMerge \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\" 
[diff] 
    guitool = extDiff 
[filter "media"] 
    required = true 
    clean = git media clean %f 
    smudge = git media smudge %f 
[filter "hawser"] 
    clean = git hawser clean %f 
    smudge = git hawser smudge %f 
    required = true 
[filter "lfs"] 
    clean = git-lfs clean %f 
    smudge = git-lfs smudge %f 
    required = true 

注:在拆除.gitignore文件解決了這個國際空間站UE。奇怪地加回來不再觸發這個問題。總而言之,我見過的最奇怪的錯誤之一。

+0

你可以在'mus'裏面顯示'ls -l'嗎? –

+0

@JeffPuckettII我已經編輯了文件夾內容的問題。我可以複製這個私人回購有多個目錄,它一直工作,直到我升級Xcode。 –

+0

這是正確的。 mus裏面沒有git repo。您只能從應用程序的根文件夾中調用'git status',其中'.git'爲 – sailens

回答

0

如果沒有mus/.git那麼mus本身不是git回購。您可以git add musmus及其內容添加到shinylang回購,或者在mus內運行git init將其初始化爲單獨的回購,但子模塊非常棘手,應該避免,除非絕對必要。

+0

它已經添加到回購這是令人費解的。超過'git status'我無法在這些目錄中運行'git diff'或任何git命令,這更令人沮喪。 –

+0

這是錯誤的。您可以從項目根目錄下的任何文件夾運行git status,無論它是否在存儲庫中進行跟蹤。 –

相關問題