POV-Ray : Newsgroups : povray.off-topic : Git branches on local machine? : Re: Git branches on local machine? Server Time
28 Apr 2024 08:03:57 EDT (-0400)
  Re: Git branches on local machine?  
From: Jim Henderson
Date: 23 Oct 2021 19:22:29
Message: <pan$36f28$54a8e8da$a6cf0a77$a49b5e84@nospam.com>
On Sat, 23 Oct 2021 19:17:07 -0400, Cousin Ricky wrote:

> There is something I don't understand about Git branches.
> 
> I have some projects that have been on my hard disk for years, but have
> just recently converted to Git repositories.  I want to start a branch
> on one of them.  My understanding is that Git tracks changes in both the
> main/master branch and the new branch.  But I only have one working copy
> of the actual files in my directory.  Which branch do these files
> represent, and where are the files of the other branch?  How does this
> all work?

The only change tracking is on the active branch.  If you're working 
outside of master, no changes you make are recorded in master unless you 
either do a cherry pick or a merge - in either case, at the point of the 
merge or cherry pick, the changes you've made (or selected, in the case 
of a cherry pick) are brought into the target branch (can be master, can 
be some other branch).

In git, you're only ever working in a single branch, ever.



-- 
"I learned long ago, never to wrestle with a pig. You get dirty, and 
besides, the pig likes it." - George Bernard Shaw


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.