<html>
<body>
Thanks Baz and Carl for your informative messages. I'll definitely check
out those links.<br><br>
Offline functionality indeed can be very useful, and I don't think it's
possible with Perforce or SVN. I have more experience with Perforce; I
used to work in a gaming company, our engine was in Perforce and each
developer had his own private branch to work in. Once the feature was
tested and the branch compiled, a dev would integrate his change into the
root branch. I found that development model very easy and safe. I do
realize it might not be adapted for more de-centralized development
though.<br><br>
Carl: Yes, the commands you listed are what I used as of now. But I still
have a few gripes (which might be answered by the info on the links you
provided):<br><br>
-I'm on Windows, and it's already been somewhat painful installing and
getting Git to run. Nevermind you get cryptic error messages about
index.lock when your repository is on FAT32.<br><br>
-I edited a makefile but it's a hack I want to keep without submitting
it. So I don't want to commit the change and submit it later on by
mistake. How can I exclude a file from getting committed while still
getting any updates from the original repo? The folks on the IRC git
channel recommended doing another branch for that one change but I don't
think it's the right solution.<br><br>
-So now I'm careful about which files get committed because I want to
exclude that makefile. I just edited stuff in the perf/ folder. So I go
in the perf/ folder and type <br>
<i>git commit -m &quot;message&quot; *<br>
</i>Git tries to commit every file in perf/ even untracked ones I never
asked it about. So reading the doc I see the -a flag should do the job.
But then the -a flag affects every modified file in the repo and ignores
the path I'm currently in. I would've thought Git would apply -a only to
the files I'm currently asking it about (in perf/). So it seems my only
option is to type the name of all the individual files I modified and
want checked in on the commit command line. 20 minutes later I still
don't have a good solution for this simple operation that takes 2 clicks
in Perforce (create a new changelist and move the modified makefile
there).<br><br>
-I then find out I can do this with git reset. It seems like git reset
can either undo a commit or mark a file for not being included at the
next commit? those are two very different functionalities in my
mind.<br><br>
-Seemingly no good way of doing a 3-way diff when I do a merge or review
a patch, at least on Windows?<br><br>
-Definitions in the doc: checkout, staged, unstaged, and other terms seem
used all over the doc without definitions. For a VSS/Perforce user, a
checkout is making files writeable and telling the SC that you'll be
editing them In Git, it seems checking out is switching branches. I'm
still unclear about staged and unstaged. It seems to mean whether a file
will be committed at the next commit operation, but I couldn't find a
definition in the doc.<br><br>
-Some commands don't seem symmetrical: for example, git add will either
add a file to the index or mark a modified file for the next commit. I'd
expect git-rm to either remove a file from the index OR unmark it form
the next commit. Instead git-rm removes a file from the index and the
working tree. You have to use git reset for unmarking files from next
commits. So the opposite of git add is either git rm or git reset
depending on what you do.<br><br>
-In switching branches, it seems that you can't have any uncommitted
changes? So if you want to switch to branch B while working on something
in branch A, your changes get to branch B, might get checked in by
mistake in that branch, and then when you switch back to branch A, you
lost the changes? I think I read about this scenario in the Git doc but I
can't find it now.<br><br>
-I just miss a good GUI like Perforce's one to see in a glance everything
about your project. I appreciate using a source control software
intuitively without thinking too much about it. I could do that my first
week with Perforce. Right now I find myself spending almost as much time
reading the Git doc as working on code. Source control should really be
as much of a transparent tool as possible.<br><br>
<br>
Anyways, these might all be &quot;Git newbie&quot; issues, but the fact
that I didn't encounter these issues with other SC software suggests that
Git is indeed harder to use. I do appreciate though it might have unique
features that make it the only tool for the job. My experience might be
also worse because I'm using it on Windows through Cygwin and can't use
any of the GUIs available.<br><br>
Antoine<br><br>
<br><br>
<br>
At 11:53 AM 1/10/2008, Carl Worth wrote:<br>
<blockquote type=cite class=cite cite="">On Thu, 10 Jan 2008 03:22:15
-0500, Antoine Azar wrote:<br>
&gt; Slightly off-topic, but I was just curious as to why we use git
for<br>
&gt; Cairo's source control?<br><br>
Here's the original message I sent out proposing the switch from cvs<br>
to git nearly two years ago:<br><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>[cairo]
Plans (and motivation) for moving cairo from CVS to git<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>
<a href="http://lists.cairographics.org/archives/cairo/2006-February/006255.html" eudora="autourl">
http://lists.cairographics.org/archives/cairo/2006-February/006255.html</a>
<br><br>
I think the concepts and motivation I introduced there are still<br>
current. And my hopes for git have all played out very well. I've
been<br>
very pleased with the increased productivity that it affords.<br><br>
The things that have changed since I wrote that are that the user<br>
interfaces and tutorials for git have improved dramatically. For<br>
example, here's something I put together showing how easy git can be<br>
to learn:<br><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>A tour of
git: the basics<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>
<a href="http://cworth.org/hgbook-git/tour/" eudora="autourl">
http://cworth.org/hgbook-git/tour/</a><br><br>
My rationale for working on that is here:<br><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>Git is
easy to learn<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>
<a href="http://cworth.org/hgbook-git/" eudora="autourl">
http://cworth.org/hgbook-git/</a><br><br>
&gt; I'm admitedly a total beginner with git, but<br>
&gt; it seems to me the only advantage it has over something like
Perforce<br>
&gt; is the ability to generate and email patches. Other than that, I
find<br>
&gt; it much less intuitive than other solutions such as Perforce or
SVN,<br>
&gt; which can be just as easily &quot;distributed&quot; by creating
branches off<br>
&gt; repositories.<br><br>
Uhm, no.<br><br>
The word &quot;branch&quot; doesn't make something distributed. And
particularly<br>
the incredibly broken concept of &quot;branch&quot; that svn provides,
(simply<br>
parallel directories).<br><br>
What makes git distributed is the following characteristics:<br><br>
&nbsp; * Disconnected operation, (make commits on an airplane, for<br>
&nbsp;&nbsp;&nbsp; example).<br><br>
&nbsp; * Not just creating branches, but *merging* them, (at the level
of<br>
&nbsp;&nbsp;&nbsp; multiple merges per day with zero pain).<br><br>
&nbsp; * Everywhere the code lives is a full-fledged repository, just
as<br>
&nbsp;&nbsp;&nbsp; functional as any other, (unlike the very distinct
notions of<br>
&nbsp;&nbsp;&nbsp; &quot;repository&quot; and &quot;working copies&quot;
like svn has). There's *no*<br>
&nbsp;&nbsp;&nbsp; notion of a &quot;central&quot; repository in any
technical sense.<br><br>
I'm quite certain that svn has none of those characteristics, (I
have<br>
no knowledge of perforce, so I can't comment on it).<br><br>
The modes of development made possible by a distributed system just<br>
don't exist with a centralized setup like svn. And if you haven't<br>
experienced it yet maybe it's just hard to appreciate it. Here's a<br>
random screenshot I googled, (&quot;gitk screenshot&quot;), that might
give some<br>
of a feel for the kind of regular branching/merging that happens<br>
everyday when you're using git and that would be unthinkably hard
with<br>
any of the centralized systems:<br><br>
<a href="http://www.flickr.com/photos/malcolmtredinnick/1516857444/" eudora="autourl">
http://www.flickr.com/photos/malcolmtredinnick/1516857444/</a><br><br>
I will confess that the &quot;write a single-feature and mail a
patch&quot; mode<br>
that you've found yourself in so far doesn't really showcase much of<br>
the great features of git. But then again, this mode can be really<br>
simple to:<br><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>git clone
git://anongit.freedesktop.org/git/cairo<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>cd
cairo<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab># hack,
hack, hack<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>git diff
&gt; feature.patch<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab># send
email<br><br>
Clearly, that's no harder than any centralized system, right?<br><br>
And I'd be fine if an initial contributor to cairo did no more than<br>
that. Now, afterwards, if this contributor wanted to submit more<br>
later, I would encourage and teach more. For example, it's much
better<br>
to replace the &quot;git diff&quot; step with:<br><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>git commit
-a<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>git
format-patch origin<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab># send
email with the commit-message.patch<br><br>
Since this gives the author a chance to write the commit message<br>
describing the patch, and that's really important. I will admit that<br>
the format-patch command-line is fairly ugly.<br><br>
Ironically, at the next stage the commands get a bit simpler. When
the<br>
contributor reaches this point I'll encourage the contributor to
start<br>
pushing commits directly to cairo's central repository. The emailing<br>
of patches will still often happen for sake of review, but the
actual<br>
git commands necessary for pushing the changes out become
simply:<br><br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>git commit
-a<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</x-tab>git
push<br><br>
So I'm curious what you see as not being intuitive here. Is there<br>
something that's not intuitive about the above command set? Or was
it<br>
more that it was hard to find a description providing something like<br>
this list of commands?<br><br>
-Carl<br>
</blockquote></body>
</html>