What have I missed?
eles via Digitalmars-d
digitalmars-d at puremagic.com
Sat Aug 9 00:48:27 PDT 2014
On Saturday, 9 August 2014 at 07:21:28 UTC, Era Scarecrow wrote:
> On Saturday, 9 August 2014 at 07:12:45 UTC, eles wrote:
> Things will be easier when it clicks for me i'm sure.
> Re-reading part of the book, a portion of it, the designs
> behind Git makes sense, but there's no 'ah ha!' moment, not
> yet. I think mostly it's the terminology i'm confused on since
> i'm often a blank state (self taught).
That's because many git tutorial start with praising its
distributed repository model and bragging about why that feature
is cool (which is very true, but it is confusing for beginners).
Ignore that part for the time being, it will click in later.
For now, just consider that your current folder has some source
code in it and that executing
$ git init
it transforms it in a "git-managed project". That's all
$ git add -A
$ git commit -m "added files"
will add all files to that project (why two commands, it will
become clear later)
$ git branch test_idea01
$ git checkout test_idea01
will put you in a new git-subproject (also known as "branch")
called "test_idea01" where you wan to test your new idea
Subsequent
$ git add -A
$ git commit -m "these modifications are added to the test_idea01
subproject"
will add modifications to the test_idea01 subproject.
once you finish with test_idea01, you go back to the original
state with:
$ git checkout master
(the initial sub-project in git it is just called "master")
and start, maybe, a new idea with:
$ git branch test_idea02
$ git checkout test_idea02
then etc., then back to the original to master
This will allow you to switch between several versionas and to
test them in the same folder, with all the rest on your computer
being equal.
Then, you will discover merging (you could bring the
modifications from test_idea01 and test_idea02 back t master) and
so on, but to start, this is it.
It will succesfully replace your archive-and-rename strategy.
Not to even tell that
$ git diff master test_idea01
will give you a nice view of the differences...
More information about the Digitalmars-d
mailing list