Git Help

Thomas Charron twaffle at gmail.com
Wed Mar 10 12:27:36 EST 2010


On Wed, Mar 10, 2010 at 11:46 AM, Coleman Kane <ckane at colemankane.org> wrote:
> Do't use 'git branch' any more for creating new branches, instead use
> 'git checkout'.

  Actually, I already knew that one, I was separating the logic in
case it confused things.  :-D

> >From your description, I think I know what you are looking for. Consider
> the following example where you edit the file 'test.c' and want to
> commit those changes to a new branch named 'branch-2' rather than the
> current branch ('master').

  And if my current branch is 'tom', with edited files, and I issue a
git checkout -b tom2, then tom2 will now be a copy of tom, PLUS the
edited file?

> Beware the HOWTO's out there, as the above sequence is the 'new way' of
> doing this in git. The old way actually used 'git branch' for all the
> branching operations and was more clumsy. This change happened within
> the past two years.

  I gave up on the HOWTO's and just dove in.  :-D  Now I'm using git
to allow an application which has a single configuration directory,
~/.skeinforge, to have multiple configuration by using a git wrapper
which uses git branches as 'profiles'.

-- 
-- Thomas


More information about the gnhlug-discuss mailing list