Can I use “git checkout --” on two files?

前端 未结 6 1062
时光取名叫无心
时光取名叫无心 2020-12-10 10:00

Is it possible to use git checkout -- on multiple files in order to discard the changes?

If so how would I specify multiple files?

6条回答
  •  南方客
    南方客 (楼主)
    2020-12-10 10:37

    Possible option could be:

    git status --porcelain | cut -c4- | xargs git checkout
    

提交回复
热议问题