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

working directory status

From
SSSivanandan Srilakshmanan <ssrilaks@gmail.com>
Date
Nov 17, 2019, 00:55 UTC
Message-ID
<CACKP9ctDPFn_oqHVSO9Lfi2aMDkAtiuViCv6PvYtmag+P+oaLQ@mail.gmail.com>
Hi,
I am new to git. I have been reading the documentation on Pro Git.

I have checked out two working directory (test1 & test2) using the "git worktree add --checkout" command.

When I run the "git status" in either (test1 or test2) on the checked out folder, the "On branch <branch name>" displays the branch name from the latest checkout (ie branch associated with test2).

Could you please provide the correct syntax to display the branch name associated with the respective folder.

Any assistance is greatly appreciated.

Thanks Lakshman

Next: Pratyush Yadav
Message 1 of 11 in “working directory status”
  1. Sivanandan SrilakshmananNov 17, 2019
  2. Pratyush YadavNov 17, 2019
  3. Sivanandan SrilakshmananNov 17, 2019
  4. Johannes SixtNov 17, 2019
  5. Sivanandan SrilakshmananNov 17, 2019
  6. Johannes SixtNov 17, 2019
  7. Sivanandan SrilakshmananNov 18, 2019
  8. Johannes SixtNov 18, 2019
  9. Eric SunshineNov 18, 2019
  10. Junio C HamanoNov 18, 2019
  11. Sivanandan SrilakshmananNov 18, 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.