From: David Fries Date: Sun, 26 Jun 2011 22:14:28 GMT Subject: [PATCH] (trivial) add helpful "use --soft" for bare reset Message-ID: <20110626221428.GA26780@spacedout.fries.net> Add a helpful "use --soft" message for git-reset (mixed) in a bare repository. This tells the user what they can do, instead of just what they can't. Signed-off-by: David Fries --- When I was first learning how to use git and I needed to reset my bare repository I would make it a full repository just so I could use git-reset, a message like the above would have saved me a lot of effort back then. I'm not the only one, I received an e-mail yesterday confused on what to do, found my patch via google "it saved my bacon." builtin/reset.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/builtin/reset.c b/builtin/reset.c index 98bca04..dd0cc1e 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -332,7 +332,7 @@ int cmd_reset(int argc, const char **argv, const char *prefix) setup_work_tree(); if (reset_type == MIXED && is_bare_repository()) - die(_("%s reset is not allowed in a bare repository"), + die(_("%s reset is not allowed in a bare repository, use --soft"), _(reset_type_names[reset_type])); /* Soft reset does not touch the index file nor the working tree -- 1.7.2.3