List git remotes« an older post

Remove deleted files from a git repository

Snippet

When updating a drupal site with drush pm-update, files can be removed. In order to remove them from the git repository, they need to be deleted with git rm. Doing them individually is painful, so do it on the command line with little effort.

Yes, those are backticks.

$ git rm `git st  | grep deleted | cut -f2 -d:`

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.