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

前端 未结 7 1901
情深已故
情深已故 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:57

    To remove the file from the index, use:

    git reset myfile
    

    This should not affect your local copy or anyone else's.

    0 讨论(0)
提交回复
热议问题