Git: How to remove file from index without deleting files from any repository

前端 未结 7 1924
情深已故
情深已故 2020-11-30 17:17

When you use

git rm --cached myfile

it doesn\'t delete from the local filesystem, which is the goal. But if you\'ve already versioned and c

7条回答
  •  广开言路
    2020-11-30 17:47

    1. git rm --cached remove_file
    2. add file to gitignore
    3. git add .gitignore
    4. git commit -m "Excluding"
    5. Have fun ;)

提交回复
热议问题