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伐。
What is "git deleted by default"? Can I understand it this way:
You don’t want to submit.swo文件?那应该在.gitignore里增加过滤。譬如:.swo
.swo
.gitignore
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 *.swpDelete git records: git rm *.swp
Find the file and remove it from the git repository, but it will not be removed locally: find ./ -name ".*.swp" -exec git rm --cache {} ;
find ./ -name ".*.swp" -exec git rm --cache {} ;
Then filter the *.swp追加到.gitignore file
*.swp
What is "git deleted by default"? Can I understand it this way:
You don’t want to submit
.swo
文件?那应该在.gitignore
里增加过滤。譬如:.swo
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
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