Suggest git clean -f for untracked changes
Currently, if brew doctor detects untracked changes in the local repo, it suggests doing 'git reset --hard', but that doesn't remove untracked files. This change adds an additional suggestion to run 'git clean -f' to remove them. Closes Homebrew/homebrew#12814. Signed-off-by: Max Howell <mxcl@me.com> Changed the path to Library as we don't want to clean -f all over the whole /usr/local :P
This commit is contained in:
parent
7c8a2656f0
commit
47cdd4d819
@ -785,7 +785,7 @@ def check_git_status
|
|||||||
unless `git status -s -- Library/Homebrew/ 2>/dev/null`.chomp.empty? then <<-EOS.undent
|
unless `git status -s -- Library/Homebrew/ 2>/dev/null`.chomp.empty? then <<-EOS.undent
|
||||||
You have uncommitted modifications to Homebrew's core.
|
You have uncommitted modifications to Homebrew's core.
|
||||||
Unless you know what you are doing, you should run:
|
Unless you know what you are doing, you should run:
|
||||||
cd #{HOMEBREW_REPOSITORY} && git reset --hard
|
cd #{HOMEBREW_REPOSITORY}/Library && git reset --hard && git clean -f
|
||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user