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

fatal: ... is already checked out at ...

From
Mark Kharitonov <mark.kharitonov@gmail.com>
Date
Apr 3, 2019, 22:15 UTC
Message-ID
<CAG2YSPzAiJW1tH7xm9bqh00VYZrpFS4RQLZ4HK7aWoPm2RxD0g@mail.gmail.com>

Hi, Please, observe:

C:\Dayforce\56 [release/r-856 ≡]> git --version git version 2.18.0.windows.1 C:\Dayforce\56 [release/r-856 ≡]> git worktree list C:/Dayforce/tip c80539e06d [arch/shelve/532684] C:/Dayforce/55 1362776f49 [release/r-855] C:/Dayforce/55WFM 0000000000 [wfm/855wfm] C:/Dayforce/56 f9c36d3a2b [release/r-856] C:/Dayforce/56 f9c36d3a2b [release/r-856] C:/Dayforce/hf56 5f1837a3f6 [hotfix/856]

Item #1 - how come I have two instances of release/r-856 in the git worktree list output? Next:

C:\Dayforce\56 [release/r-856 ≡]> git co onboarding/r-856/james-config Checking out files: 100% (2055/2055), done. Switched to branch 'onboarding/r-856/james-config' Your branch is up to date with 'origin/onboarding/r-856/james-config'. C:\Dayforce\56 [onboarding/r-856/james-config ≡]> git co release/r-856 fatal: 'release/r-856' is already checked out at 'C:/Dayforce/56'

Item #2 - why cannot I checkout release/r-856, if I am already in the right working tree? I suppose it is connected to item #1 Next:

C:\Dayforce\56 [onboarding/r-856/james-config ≡]> git co -B release/r-856 $(git rev-parse release/r-856) Checking out files: 100% (2055/2055), done. Switched to and reset branch 'release/r-856' Your branch is up to date with 'origin/release/r-856'. C:\Dayforce\56 [release/r-856 ≡]>

This is how I forced the checkout.

Does not seem right. Is it a git bug or is it something we are doing wrong? Thank you.

-- 
Be well and prosper.
==============================
"There are two kinds of people.Those whose guns are loaded and those who dig."
   ("The good, the bad and the ugly")
So let us drink for our guns always be loaded.
Next: Eric Sunshine
Message 1 of 2 in “fatal: ... is already checked out at ...”
  1. Mark KharitonovApr 3, 2019
  2. Eric SunshineApr 4, 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.