POV-Ray : Newsgroups : povray.off-topic : Git branches on local machine? : Re: Git branches on local machine? Server Time
4 Jul 2022 01:15:03 EDT (-0400)
  Re: Git branches on local machine?  
From: BayashiPascal
Date: 24 Oct 2021 05:20:00
Message: <web.6175240678e23082c7449d78e0f8c582@news.povray.org>
Cousin Ricky <ric### [at] yahoocom> 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 files you're seeing in the directory of the repository are the files of the
currently selected branch. 'git status' will tell you on which branch you
currently are if you forgot. To select a branch, you can use 'git checkout
name_your_branch'. After selecting another branch, if you look again in the
directory it will contain the files of that selected branch. Behind the scene
git moves files from/to hidden folders, so everything is there but you only see
the files of one branch at a time.

Pascal


Post a reply to this message

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