Remove already deleted files in Git
Ever accidentally removed a file using only rm
instead of git rm
and having to check it out and remove it again?
Not anymore! Just run:
$ git rm `git status | grep deleted | awk '{print $3}'`
Written by Ramon Kleiss
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#