对我来说,git clean -f删除了所有 *.oig 文件。并保留之前已经存在的那些。
这是合并后它(几乎)的样子:
$ git status
On branch feature/xyz
Your branch is ahead of 'origin/feature/xyz' by 568 commits.
(use "git push" to publish your local commits)
Untracked files:
(use "git add <file>..." to include in what will be committed)
.idea/codeStyles/
.idea/misc.xml.orig
.idea/codeStyles/在合并之前已经作为未跟踪的文件存在。.idea/misc.xml.orig(以及更多)必须被删除。
=> 使用git clean -f:
$ git clean -f
Removing .idea/misc.xml.orig
导致:
$ git status
On branch feature/xyz
Your branch is ahead of 'origin/feature/xyz' by 568 commits.
(use "git push" to publish your local commits)
Untracked files:
(use "git add <file>..." to include in what will be committed)
.idea/codeStyles/