git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: Git checkout multiple options issue

From
C-COLLOMB Joris -EXT <joris.collomb-ext@alstomgroup.com>
Date
Jan 28, 2019, 14:24 UTC
Message-ID
<HE1PR01MB3722D90668E75E4BCDBA71F2A9960@HE1PR01MB3722.eurprd01.prod.exchangelabs.com>
In-Reply-To
<000201d4b713$7edcd3d0$7c967b70$@nexbridge.com>
Thanks for answer,

git checkout -f -b "branch_name" gives me " Fatal: A branch named 'branch_name' already exists."

I understand that here the checkout is force, but not the branch creation. The opposite option order doesn't work:

git checkout -b -f "branch_name" gives me "Fatal: '-f' is not a valid branch name."

Once again sorry if this is expected behavior.
[For clarity, I'm trying to move a branch and checkout it with one command.]

Regards, Joris

-----Message d'origine----- De : Randall S. Becker <rsbecker@nexbridge.com> Envoyé : lundi 28 janvier 2019 15:12 À : COLLOMB Joris -EXT <joris.collomb-ext@alstomgroup.com>; git@vger.kernel.org Objet : RE: Git checkout multiple options issue

On January 28, 2019 8:25, COLLOMB Joris wrote:
Show 6 quoted lines
> git checkout -fb "branch_name"
> (force branch creation and checkout it)
>
> doesn't work (even if option a separated).
>
> I don't know if this is consider as an issue, but here it is.
I think you might mean (which works on every platform I have):
git checkout -f -b "branch_name"
There is no provision for aggregating options into one. -fb (invalid) is not the same as -f -b (valid).

Regards, Randall

-- Brief whoami:
 NonStop developer since approximately 211288444200000000  UNIX developer since approximately 421664400
-- In my real life, I talk too much.

________________________________ CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium.

Previous: Randall S. BeckerNext: Randall S. Becker
Message 3 of 8 in “Git checkout multiple options issue”
  1. COLLOMB Joris -EXTJan 28, 2019
  2. Randall S. BeckerJan 28, 2019
  3. COLLOMB Joris -EXTJan 28, 2019
  4. Randall S. BeckerJan 28, 2019
  5. Kevin DaudtJan 28, 2019
  6. Junio C HamanoJan 28, 2019
  7. COLLOMB Joris -EXTJan 28, 2019
  8. Randall S. BeckerJan 28, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.