相信积累的力量

git remove files which have been deleted

http://www.commandlinefu.com/commands/view/1246/git-remove-files-which-have-been-deleted


git remove files which have been deleted

Terminal - git remove files which have been deleted
git rm $(git ls-files --deleted)
2009-02-26 21:21:02
Functions: rm
18
Up
Down
git remove files which have been deleted

This command handles git rm'ing files that you've deleted.

Show sample output | Add to favourites | Report as malicious

Alternatives

There are 2 alternatives - vote for the best!

Terminal - Alternatives
git add -u
2009-09-16 00:13:14
User: donnoman
Tags: git
38
Up
Down

It deletes all removed files, updates what was modified, and adds new files.

Comments (3) | Add to favourites | Report as malicious
git ls-files -z --deleted | xargs -0 git rm
2009-07-14 08:29:38
Functions: xargs
Tags: git
4
Up
Down

I've used technicalpickles command a lot, but this one handles whitespaces in filenames. I'm sure you want to create an alias for it :)

Show sample output | Comments (1) | Add to favourites | Report as malicious
posted @ 2013-08-13 22:03  ThreeF  阅读(353)  评论(0编辑  收藏  举报

相信积累的力量