Git remove directory

后端 未结 4 1706
天涯浪人
天涯浪人 2021-02-03 18:24

I\'ve got a repository on GitHub (http://github.com/hrickards/PHP-Crypto) for a little project me and a couple of others are working on. My development environment is Aptana Stu

4条回答
  •  爱一瞬间的悲伤
    2021-02-03 19:00

    This is what I use, and I think you'll want to as well. It's close to the other answers, but instructs git to NOT change the local files.

    git rm -r -f --cached DirectoryName
    
    • -r : recursive
    • -f : force
    • --cached : apply ONLY to index (staging area). Git leaves the local copies alone.

提交回复
热议问题