Drathier
Drathier

Reputation: 14539

`git clean` from other working directory

Some git commands take a --git-dir argument, but git clean doesn't seem to do so.

How can I do what cd someDir && git clean -abcd would have done, without changing working directory?

Upvotes: 0

Views: 281

Answers (1)

chepner
chepner

Reputation: 531738

--git-dir is an option of git, not git-clean.

git --git-dir someDir/.git clean -abcd

Upvotes: 3

Related Questions