Ole
Ole

Reputation: 46900

Removing all the files in a branch with git?

Trying to run git rm -r * on a branch. I have dist in .gitignore, but still get this error:

fatal: pathspec 'dist' did not match any files

Thoughts?

Upvotes: 0

Views: 199

Answers (1)

Robert Nubel
Robert Nubel

Reputation: 7522

You're seeing this error because * is actually interpolated by your shell into the list of all files; git doesn't know you're trying to use a wildcard. git rm -r . ("delete all files recursively, starting from this folder") should work instead.

Upvotes: 2

Related Questions