venerdì 3 agosto 2012

git: adding all untracked, modified and deleted files

This is a memento for the future.

To git add all the untracked, modified or deleted files files in a repository:
$ git status -s|awk '{ print $2 }'|xargs git add
To git reset HEAD all the previously staged files:
$ git status -s|awk '{ print $2 }'|xargs git reset HEAD

Nessun commento:

Posta un commento