http://www.euclideanspace.com/software/development/github/workflow/

I'm not sure if this diagram is quite right. I get the impression that
the 'git checkout' command swaps around the directory contents and I
don't know how to show that.

Now you have 3 boxes trunk, master, fricas. I don't quite get their meaning.

The best thing to think about a git repository is in terms of a Directed Acyclic Graph (DAG) of commits. Consider this graph being labelled with the sha-1 numbers. Since identical sha-1 numbers mean identical content, it doesn't matter where in the world that content is stored. Now, consider the fricas git repo. that consists of all commits that lead to the master branch of https://github.com/hemmecke/fricas-svn
In fact, I have another DAG here. https://github.com/hemmecke/fricas
And you have a DAG here. https://github.com/martinbaker/fricas
All three are probably different, but they share quite a big part.
Consider the "fricas git repository" simply as "the repository of every commit that anyone in the world has ever committed to fricas", i.e. you consider the union of all commits over all users. That gives a HUGE DAG (let's call it FRICAS). But by the sha-1 numbers, you are sure that all the three repos above just form a subgraph of FRICAS. All we are doing with git, is to modify and extend this FRICAS DAG.

Now, whenever you say "git checkout some-sha-1" git will switch the files in your working directory to contain exactly the state corresponding to "some-sha-1".

It's usually. not a big deal to work in the same directory. Git never override a modified file by "git checkout", but rather aborts and tells you that you have uncommitted changes. It's actually very hard to lose some data with git.

Your picture is wrong in so far as you should have just one clone corresponding to your https://github.com/martinbaker/fricas .

Let's call this clone "fricas". "fricas" has two "remotes" (which you see by "git remote -v"). Namely,

origin   https://github.com/martinbaker/fricas
upstream https://github.com/hemmecke/fricas-svn

You can fetch data from any of these remotes. (Remember the big FRICAS DAG. Basically, with adding more and more remotes, you have access to a bigger part of FRICAS. But one usually only concentrates on a few remotes (like upstream) and ignores what other people do with fricas.)

trunk and master are just local names for branches. Nothing fancy with these names. The important things are actually the sha-1's.

It looks as the fricas box in your picture is the so-called working directory whereas the trunk and master boxes correspond to branches.

BTW, instead of "git merge" I have suggested "git rebase" in my previous mail. Learn about this difference. Since we still have to deal with an SVN official repository, that does matter.

http://book.git-scm.com/4_rebasing.html
http://gitready.com/intermediate/2009/01/31/intro-to-rebase.html

Ralf

--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Reply via email to