Jacko Jacko - 1 year ago 141
Git Question

Unstage all deleted files in Git

I want to unstage all file deletes. Is there an easy way?

I want to apply this to the file pattern of all deletes.

Answer Source

The output of git status --porcelain is a great way to build one-liners and scripts for tasks like this:

git status --porcelain | awk '$1 == "D" {print $2}' | xargs git reset HEAD
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download