Remove file from the repository but keep it locally

后端 未结 2 1726
自闭症患者
自闭症患者 2020-12-07 07:02

I have a folder which I\'d like to remove in my remote repository. I\'d like to delete it, but keep the folder in my computer

2条回答
  •  旧巷少年郎
    2020-12-07 07:15

    I would just:

    • Move the folder out of your working tree
    • git rm the folder, commit the change
    • Add to .gitignore (or .git/info/excludes), commit the change
    • Move the folder back

提交回复
热议问题