close

刪除已經加入過Git索引的檔案

 

1. 檔案庫中含沒有任何檔案,也就是執行過指令git init之後還未執行過指令git commit

  • git rm --cached

 

2. 檔案庫中已經有檔案,也就是已經執行過指令git commit

  • git reset HEAD 檔案名稱
  • git rm 檔案名稱
  • git commit -m "簡介"
arrow
arrow
    文章標籤
    github git
    全站熱搜
    創作者介紹
    創作者 Rex 的頭像
    Rex

    Rex-Software-Blog

    Rex 發表在 痞客邦 留言(0) 人氣()