POV-Ray : Newsgroups : povray.off-topic : Nope, I STILL don't understand git branches : Re: Nope, I STILL don't understand git branches Server Time
27 Jan 2026 13:24:41 EST (-0500)
  Re: Nope, I STILL don't understand git branches  
From: Mr
Date: 23 Jan 2026 19:20:00
Message: <web.69740f24461f9d4efe29df036830a892@news.povray.org>
Jim Henderson <nos### [at] nospamcom> wrote:
> On Fri, 23 Jan 2026 00:25:24 -0400, Cousin Ricky wrote:
>
> > On 2026-01-22 22:38 (-4), Shay wrote:
> >> Cousin Ricky <ric### [at] yahoocom> wrote:
> >>> I created a branch, made some changes there, then switched back to the
> >>> main branch, and the changes were also in that branch as well.  Why
> >>> did the changes apply to both branches?  What am I missing?
> >>>
> >>> Most baffling is that I got branches to work just 3 weeks ago.  I
> >>> don't know what I did differently.
> >>
> >> 90% chance you created a branch with `git branch` but then never
> >> checked it out.
> >> Create a branch with `git checkout -b new-branch` to do both at the
> >> same time.
> >
> > Nope, that wasn't it.  It still changes both branches at the same time.
>
> I might be mistaken (it's WAY to early in the morning for me to be
> thinking about this), but if the file isn't added to the repo and just
> lives within the directory, then I don't think any changes get tracked,
> and this is the behavior you would probably see.
>
> Make sure you use `git add <filename>` for anything you want change
> tracking enabled.
>
>
>
> --
> "I learned long ago, never to wrestle with a pig. You get dirty, and
> besides, the pig likes it." - George Bernard Shaw

Also I don't know how bad you feel about using GUI, but I love Git-Cola for
spotting that kind of issue.


Post a reply to this message

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