github - How to delete all .swo files using git
伊谢尔伦
伊谢尔伦 2017-05-02 09:35:14
0
3
826

When using vim, sometimes it will exit abnormally and .swp files will be generated in the folder. Can git delete such files by default?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(3)
为情所困

What is "git deleted by default"? Can I understand it this way:

  1. You don’t want to submit.swo文件?那应该在.gitignore里增加过滤。譬如:.swo

  2. You don’t want to affect future modifications to files that were exited abnormally last time? There is no good way, just delete it manually

某草草

Delete files: rm -rf *.swp
Delete git records: git rm *.swp

过去多啦不再A梦

Find the file and remove it from the git repository, but it will not be removed locally:
find ./ -name ".*.swp" -exec git rm --cache {} ;

Then filter the *.swp追加到.gitignore file

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template