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

Re: How are the same file modified on different brances stored physically?

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 3, 2008, 09:06 UTC
Message-ID
<7vskz8i3cy.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<15799383.post@talk.nabble.com>
amishera <amishera2007@gmail.com> writes:
> I am trying to figure out how stuffs work behind the scene. We know that we
> can switch branches freely and then work on the switched branch. If the same
> file is modified on two branches then how are the two copies of the two
> branches saved?

They are saved separately, and depending on which branch you check out, the appropriate one for that branch is given to you.

Previous: amisheraNext: Mike Ralphson
Message 2 of 4 in “How are the same file modified on different brances stored physically?”
  1. amisheraMar 3, 2008
  2. Junio C HamanoMar 3, 2008
  3. Mike RalphsonMar 3, 2008
  4. Jakub NarebskiMar 3, 2008

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.