<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
On 15/06/2010 16:09, Erik Schnetter wrote:<br>
<blockquote cite="mid:33DEA0DC-7DDB-4120-B11B-913A398001BE@cct.lsu.edu"
type="cite">
<blockquote type="cite">
<pre wrap="">It seems that git clone has a "-b" option to specify which branch to
check out after the repository is cloned, but this doesn't seem to
exist in anything but the latest versions of git (for example, it
exists in 1.7.1 but not in 1.6.1). So a separate "git checkout"
command will have to be run by GetComponents.
</pre>
</blockquote>
<pre wrap="">
We also need to collect on the wiki the commands that we need to
execute to create these branches in the first place. It's not trivial
for git.
Do you have experience with branches in git? Is it easier to use
branches, or to have separate repositories and push/pull changes in
between?
</pre>
</blockquote>
I think the best thing is to just have a single repository with a tag
and branch for each release. This is quite straightforward to do:<br>
<br>
1. Tag the current revision (if you want the revision signed, use
something other than -a):<br>
<blockquote>git tag -a ET_2010_06<br>
git push --tags<br>
</blockquote>
2. Create a branch for the revision:<br>
<blockquote>git branch ET_2010_06<br>
git push origin refs/heads/ET_2010_06<br>
</blockquote>
If you then want to checkout the new branch, you use:<br>
<blockquote>git checkout -b ET_2010_06 origin/ET_2010_06<br>
</blockquote>
If you make a mistake and want to remove the remote branch, then you
can do so with:<br>
<blockquote>git push origin :refs/heads/ET_2010_06<br>
</blockquote>
A good model for a large project working with git is the VLC project.
They create a tag and branch for each release. In their case, they have
the branches in separate repository, but only because there are so many
extensive changes between versions and the single repository was
getting quite large. I don't think in this case it is so important, but
it can always be done at a later stage anyway. They also have a useful
page listing all the useful commands they use for working with their
repositories: <a class="moz-txt-link-freetext" href="http://wiki.videolan.org/Git">http://wiki.videolan.org/Git</a><br>
<br>
Regards,<br>
Barry<br>
</body>
</html>