RubyRedGrapefruit
RubyRedGrapefruit

Reputation: 12224

How can I commit only deletes with Git?

I know how to do:

git commit -a -m "whatever"

but I don't want to commit everything, just push up some files to be deleted.

Upvotes: 4

Views: 92

Answers (1)

diagonalbatman
diagonalbatman

Reputation: 18002

If you only want to add deleted files, try:

git ls-files --deleted -z | xargs -0 git rm
git commit

Upvotes: 3

Related Questions