My initial commit contained some log files. 个人初始提交包含一些日志文件。 I've added *log
to my .gitignore
, and now I want to remove the log files from my repository. 我已将*log
添加到个人.gitignore
,如今我想从个人存储库中删除日志文件。 git
git rm mylogfile.log
will remove a file from the repository, but will also remove it from the local file system. 将从存储库中删除文件,但也将从本地文件系统中删除它。 this
How can I remove this file from the repo without deleting my local copy of the file? 如何在不删除文件本地副本的状况下从存储库中删除此文件? spa