All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Jose Wielandt <jose.wielandt@timining.com>
Cc: git <git@vger.kernel.org>
Subject: Re: Please, paint new branch errors in RED (or any visible color)
Date: Fri, 10 Dec 2021 17:32:41 +0100	[thread overview]
Message-ID: <211210.86r1akbes8.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <CAJrA3nLUG_m1ftdAyzFBkmL3m1vMPuv5dd3bYVVOmXV-fThwnA@mail.gmail.com>


On Fri, Dec 10 2021, Jose Wielandt wrote:

> Hi community,
>
> At my work we've been struggling a lot with not realizing that our new
> branch creation actually failed, ending up with a push directly to
> develop. What are those cases?
>
> $ git checkout -b feature/solve p-eq-np
> fatal: Cannot update paths and switch to branch 'feature/solve' at the
> same time.
>
> What's my proposal?
>
> $ git checkout -b feature/solve p-eq-np
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> FATAL: CANNOT UPDATE PATHS AND SWITCH TO BRANCH 'feature/solve' AT THE SAME TIME
>
>                  YOU STILL IN THE SAME BRANCH ! ! ! !
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> ***(but in bright RED)***
>
>
> Another case!
>
> $ git branch feature/solve p-eq-np
> fatal: Not a valid object name: 'p-eq-np'.
>
> I'll let that one to your imagination but please, make it appear in
> red so we can easily (visually) realize that something went wrong.
>
>
> This has been the third time in a month we accidentally pushed changes
> to develop bc we didn't realize that the command failed.

I think if we'd improve the output we'd probably add some "advice"
output, i.e. "hint:" lines, not ALL CAPS.

But have you tried to see if the "git switch" command has the same UX
caveats? It was meant to address some of these tricky/unexpected issues
in 'checkout'.

  reply	other threads:[~2021-12-10 16:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10 11:36 Please, paint new branch errors in RED (or any visible color) Jose Wielandt
2021-12-10 16:32 ` Ævar Arnfjörð Bjarmason [this message]
2021-12-10 16:42   ` Fabian Stelzer
2021-12-10 19:09     ` Jose Wielandt
2021-12-11  2:30       ` Ævar Arnfjörð Bjarmason
2021-12-12 18:38         ` Junio C Hamano
2021-12-12 19:01           ` Ævar Arnfjörð Bjarmason
2021-12-12 22:27             ` Eric Sunshine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=211210.86r1akbes8.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=jose.wielandt@timining.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.