交互式清洁

git clean -i

将打印出要删除的项目,并通过以下命令请求确认:

Would remove the following items:
  folder/file1.py
  folder/file2.py
###  Commands 
    1: clean        2: filter by pattern        3: select by numbers        4: ask each
    5: quit        6: help
What now>

交互式选项 i 可以与 Xd 等其他选项一起添加。