From b834027b179c72c47339b7dd65c7cbf2b8ed4b0a Mon Sep 17 00:00:00 2001 From: Max Howell Date: Wed, 29 Aug 2012 09:03:41 -0400 Subject: [PATCH] Doctor suggest `git clean -f` if unstaged files This is safe, I tested various scenarios, including Homebrew installed in ~. The only files that are removed are unexpected files in Homebrew's already managed directories. --- Library/Homebrew/cmd/doctor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index a6cedd2ffd..0786d7c999 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -788,7 +788,7 @@ def check_git_status If this a surprise to you, then you should stash these modifications. Stashing returns Homebrew to a pristine state but can be undone should you later need to do so for some reason. - cd #{HOMEBREW_REPOSITORY} && git stash + cd #{HOMEBREW_REPOSITORY}/Library && git stash && git clean -f EOS end end