よくわからないけど、以下のような状態になりました。全部消したいです。
$ git status
On branch master
Your branch is up-to-date with 'upstream/master'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
(copy: conflict on 2017-05-09).gitignore
app/assets/javascripts/front/solutions.js (copy: conflict on 2017-05-09).coffee
app/assets/stylesheets/front/detailmain (copy: conflict on 2017-05-09).scss
app/assets/stylesheets/front/theme (copy: conflict on 2017-05-09).scss
app/controllers/mypage/profiles_controller (copy: conflict on 2017-05-09).rb
app/controllers/user/mail_activate_controller (copy: conflict on 2017-05-09).rb
app/models/user (copy: conflict on 2017-05-09).rb
app/views/console/solutions/_form.html (copy: conflict on 2017-05-09).slim
app/views/pages/index.html (copy: conflict on 2017-05-09).slim
config/initializers/paperclip (copy: conflict on 2017-05-09).rb
db/schema (copy: conflict on 2017-05-09).rb
spec/requests/console/solutions_spec (copy: conflict on 2017-05-09).rb
nothing added to commit but untracked files present (use "git add" to track)
$ git clean -f
を使えば良いのですが、それを知らないぼくは、ただただ意味のないコマンド を書きました。
$ git status -s | cut -c4- | sed -e 's/\([ |\(|\)]\)/\\\1/g' | xargs rm -fr
勉強になりました。ありがとうございました。
追記
Untracked なファイルを消すには、git clean -f
で良いのですが、ディレクトリだとこのコマンドは削除してくれなかったです。なので、たくさんいらないディレクトリとか、ファイルとかがあるときは、上の思い出コマンドも使えるかもしれないと思いました。(そんな機会は訪れないと思いますが...
追記2
git clean -df
でディレクトリも消せました。めでたしめでたし。