Snippet: Cleanup your Git repository

Posted by Dan Sosedoff on June 15, 2010

Snippet (found on net) for removing files from repository that are no longer present under your project.

$ git rm $(git ls-files -d)

For best use add it to bash alias file: ~/.bashrc or ~/.bash-aliases (under ubuntu):

alias gitclean='git rm $(git ls-files -d)'
Trackbacks

Trackbacks are closed.

Comments

Comments are closed.