How to remove local (untracked) files from the current Git working tree

前端 未结 30 2062
死守一世寂寞
死守一世寂寞 2020-11-22 00:07

How do you delete untracked local files from your current working tree?

30条回答
  •  隐瞒了意图╮
    2020-11-22 00:39

    I like git stash push -u because you can undo them all with git stash pop.

    EDIT: Also I found a way to show untracked file in a stash (e.g. git show stash@{0}^3) https://stackoverflow.com/a/12681856/338986

    EDIT2: git stash save is deprecated in favor of push. Thanks @script-wolf.

提交回复
热议问题