对我来说,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/