Remove
1 git rm
只有一個檔案要刪除
方法1:直接鍵入命令 "git rm 檔名",刪除並暫存(後續只需commit)
方法2:先刪除檔案 "rm 檔名",再使用"git rm 檔名"進行暫存
2 git add -u .
有很多檔案要刪除,遍歷工作樹,尋找之前已識別的檔案,並暫存它們的刪除
其中,.表示當前工作目錄的簡寫,從當前目錄遞迴到最深處
3 git rm --cached 檔名
刪除檔案,但不想從檔案系統中刪除,即git不再跟蹤該檔案
相關文章
- remove()REM
- JavaScript remove()JavaScriptREM
- jQuery remove()jQueryREM
- Remove ElementREM
- Remove Element 解答REM
- DataTransferItemList.remove()REM
- Remove Unused ModulesREM
- JavaScript select remove()JavaScriptREM
- jQuery empty() vs remove()jQueryREM
- how to remove datafile pathREM
- openmesh - impl - Remove Duplicated VerticesREM
- std::remove_if 介紹REM
- Docker remove all containersDockerREMAI
- Remove Invalid Parentheses[難]REM
- leetcode Remove ElementLeetCodeREM
- Remove Oracle Rac (11.2.0.1)REMOracle
- Remove Duplicates from Sorted ListREM
- 為什麼要removeREM
- [leetcode]remove-elementLeetCodeREM
- jQuery之empty()與remove()方法jQueryREM
- Remove-duplicates-from-sorted-listREM
- Java List的remove()方法陷阱JavaREM
- Remove-duplicates-from-sorted-arrayREM
- Remove Untagged Images From DockerREMDocker
- Leetcode-Remove ElementLeetCodeREM
- Remove Element leetcode javaREMLeetCodeJava
- c++的remove函式C++REM函式
- C++ remove erase 用法淺析C++REM
- leetcode-27. Remove ElementLeetCodeREM
- Leetcode 27 Remove-ElementLeetCodeREM
- Check the existence of public synonyms Remove the public synonymsREM
- leetcode27_Remove ElementLeetCodeREM
- 26. Remove Duplicates from Sorted ArrayREM
- Ural2110 : Remove or MaximizeREM
- 83. Remove Duplicates from Sorted ListREM
- STL Vector remove()和erase()的使用REM
- LeetCode-Remove Duplicate LettersLeetCodeREM
- 遍歷List 同時 remove 元素REM