我有一臺Mac Pro和一臺Macbook Pro,它們都在存儲在GitHub上的同一個項目上工作。當我嘗試使用GitHub for Mac同步Mac Pro時,我發現我現在有兩個分支,頭和主。當我嘗試從MacBook Pro的我得到這個錯誤同步由Git/Xcode和GitHub爲Mac擋住了
Failed to lookup reference. Failed to update loose reference. -entry not found in hash table.
:
Uncommitted changes. Please commit your changes before syncing.
有一個刪除的圖標/ R線在當我嘗試合併他們,我得到這個錯誤底層框。我沒有回憶刪除一個圖標。當我嘗試提交此「變」我得到這個錯誤:
On branch master Your branch is ahead of 'origin/master' by 2 commits.
Changes not staged for commit: (use "git add/rm ..." to update what will be committed) (use "git checkout -- ..." to discard changes in working directory)
deleted: "Icon\r" no changes added to commit (use "git add" and/or "git commit -a")
如果我嘗試使用Xcode的同步我得到這個錯誤:
The working copy "Graphing-Calculator" failed to commit files. error: pathspec 'Icon\r' did not match any file(s) known to git.
我真的很爲難。很明顯,我做錯了什麼,不知道那是什麼,也不知道如何解決它。引導讚賞。
更新
當我嘗試推出的MBP後面兩次提交我得到這個錯誤:
(
0 GitHub 0x0000000100096531 -[GHApplication presentError:] + 445
1 libdispatch.dylib 0x00007fff9277d90a _dispatch_call_block_and_release + 18
2 libdispatch.dylib 0x00007fff9277f77a _dispatch_main_queue_callback_4CF + 308
3 CoreFoundation 0x00007fff90564c0c __CFRunLoopRun + 1724
4 CoreFoundation 0x00007fff90564216 CFRunLoopRunSpecific + 230
5 HIToolbox 0x00007fff90f5c4ff RunCurrentEventLoopInMode + 277
6 HIToolbox 0x00007fff90f63c21 ReceiveNextEventCommon + 355
7 HIToolbox 0x00007fff90f63aae BlockUntilNextEventMatchingListInMode + 62
8 AppKit 0x00007fff913dc191 _DPSNextEvent + 659
9 AppKit 0x00007fff913dba95 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
10 AppKit 0x00007fff913d83d6 -[NSApplication run] + 463
11 AppKit 0x00007fff9165652a NSApplicationMain + 867
12 GitHub 0x00000001000014e4 start + 52
13 ??? 0x0000000000000002 0x0 + 2
)
更新
我敢肯定,我已經凝結下來對此:Git認爲文件Icon \ r已被刪除並希望提交此更改,但無法找到文件Icon \ r。如果我試圖放棄更改,Git會給我錯誤,「圖標\ r與git已知的任何文件都不匹配。」如何進行?
你可以添加git status的輸出嗎?至少第二臺機器上的錯誤似乎是自我解釋。使用'git rm'將你的改變添加到暫存區,'git commit'和'git push'(看起來你還有2個其他評論尚未推送)。 – pmr
git狀態顯示我在上面顯示的輸出分支主。 –
你知道了嗎?我正在開發的一個項目起源於Macbook,我在一臺Windows機器上,我猜想它沒有Icon \ r的概念,因此git狀態告訴我它已被刪除。我仍然可以承諾,推,拉等,但我似乎無法做任何事情擺脫那該死的#刪除:「Icon \ r」 編輯:剛剛意識到你只更新這4小時前,這是不通常的老帖子沒有答案,快速工作谷歌:S – DannyT