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

Re: Feature request for automatic worktree checkout

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 18, 2016, 18:33 UTC
Message-ID
<xmqqpoqakd8s.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CADWjqk40KK=AuKqqdpKjkBuUvhQb4k4fMR4bPfdo8JkGRs-Y9w@mail.gmail.com>
Ehsan Azarnasab <azarnasab@gmail.com> writes:
Show 8 quoted lines
> Currently if I have a branch checked out in a work-tree, git-checkout
> will show this error message when checking out that branch:
>
> $ git checkout master
> fatal: 'master' is already checked out at '/home/dashesy/development/feature'
>
> It would be very useful to instead of this error just change the
> current working directory, so git checkout would become a `cd` command

That is an understandable thing to want from 10,000ft view, but it would not be something Git, or any external command that is spawned by the shell for that matter, can address. You'd need to teach the shell to cooperate.

Previous: Ehsan AzarnasabNext: Jacob Keller
Message 2 of 3 in “Feature request for automatic worktree checkout”
  1. Ehsan AzarnasabJul 18, 2016
  2. Junio C HamanoJul 18, 2016
  3. Jacob KellerJul 19, 2016

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.