On Mon, Mar 21, 2016 at 12:14 PM, Eric Sunshine <[email protected]> wrote:
> [please don't top-post; respond inline instead]
>
> On Mon, Mar 21, 2016 at 2:53 PM, elena petrashen
> <[email protected]> wrote:
>> Thank you for the feedback!
>> The safety concert is indeed a good point. Would it maybe make
>> sense to request user to confirm this operation? I.e:
>> $git delete -D -
>> You've requested to delete "foo" branch. Proceed with deleting? y/n
>
> Rather than requiring the user to stop and answer a question, an
> alternative would be to perform the deletion as requested but then
> give advice about how to recover if the wrong branch was deleted by
> mistake, much in the way advice is given when switching to a detached
> head. (And, the advice could be suppressed by an "advice"
> configuration variable similar to how other advice messages can be
> suppressed.)
There is some advice, but it is not spelled out for beginners IMO
Deleted branch test_branch (was c62f9fe).
I would assume intermediate Git users would know c62f9fe to be a sha1 which
can be used to retrieve the content of the deleted branch. It is a good
idea nevertheless to add
To recover the branch: "git branch test_branch c62f9fe
I would not even make it configurable to suppress it as it is just 2 more
lines.
Thanks,
Stefan
>
>> Also, do you think - shortcut is justifiable for $git branch -m when
>> referring to the "old branch"?
>
> It comes up once in a while that I've switched away from a branch and
> then decide I want to rename it, but it's infrequent enough that it's
> difficult to say if it would be generally useful.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html