iT邦幫忙

0

git commit 跳出fatal: unable to stat 'cd ..': No such file or directory 錯誤

git

剛剛使用強制刪除檔案軟體,把'cd ..' 檔案刪除,以可以正常commit 謝謝。

今天在一如往常修改完code後要commit時候發生問題,一直無法送出去,
麻煩大家幫忙看看 問題出在哪,以下是指令的步驟跟圖

1.使用git add . 指令時候

https://ithelp.ithome.com.tw/upload/images/20180605/201027796YdGDziJGS.jpg

2.使用git commit -m "1.增加socialite require 2.增加shop fb登入 3.shop商品介面更新"

https://ithelp.ithome.com.tw/upload/images/20180605/20102779QIgEmX9vwz.jpg

3.使用git status 查看狀況時候顯示

https://ithelp.ithome.com.tw/upload/images/20180605/20102779upEVvm5HV9.jpg

4.依照指令下了 git commit -a

https://ithelp.ithome.com.tw/upload/images/20180605/20102779RHH0kF1S0b.jpg
https://ithelp.ithome.com.tw/upload/images/20180605/20102779rOaIydLAIV.jpg

現在卡在無法commit出去,會一直顯示no changes added to commit
git commit -m "1.增加socialite require 2.增加shop fb登入 3.shop商品介面更新"

PS:到資料夾底下發現,有一個檔案叫做cd .. 無法移除 無法更改https://ithelp.ithome.com.tw/upload/images/20180605/20102779t2INkXLu1k.jpg

看更多先前的討論...收起先前的討論...
補充一下 到資料夾底下發現,有一個檔案叫做cd .. 無法移除 無法更改@@
Homura iT邦高手 1 級 ‧ 2018-06-06 15:31:24 檢舉
no changes added to commit是指你的檔案沒有任何變動的意思....
對的,看起來是因為在資料夾底下有一個檔案叫做 cd ..
導致不管是git add . 跟 git commit 都會失敗,
在強制移除這個檔案後,就可以正常add 並且commit了。 
Homura iT邦高手 1 級 ‧ 2018-06-07 08:45:10 檢舉
所以原來是那個檔案害你不能git add啊(噴
恭喜恭喜
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友回答

立即登入回答