0
我.gitignore
文件看起來像這樣:如何忽略以〜在git結尾的文件?
> cat .gitignore
.bundle
db/*.sqlite3
log/*.log
tmp/**/*
*~
但是,Git並不忽略文件與~
結束:
> git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: app/views/jobs/_form.html.erb
# modified: app/views/jobs/_form.html.erb~
# modified: public/stylesheets/jobs_new_edit.css~
什麼能日ereason是什麼?
我認爲@ kan的回答正是你想要的,我有個人建議:在你的'.vimrc'中加入'set nobackup'。然後它不再生成'*。*〜'文件。 :) – Kjuly 2011-12-30 10:16:37