[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Yet another 2 patches for music streams
From: |
Johannes Schindelin |
Subject: |
Re: Yet another 2 patches for music streams |
Date: |
Mon, 22 May 2006 19:23:12 +0200 (CEST) |
Hi,
On Mon, 22 May 2006, Erik Sandberg wrote:
> On Monday 22 May 2006 17:43, Johannes Schindelin wrote:
> > > You might want to experiment with some of the newer VC systems. Someone
> > > on the list mirrors lilypond CVS with GIT.
> >
> > I do.
> >
> > If you are interested, I can make it public.
> >
> > At the moment, I track the CVS every morning (Greenwich time).
>
> That sounds great, if it's not too much work for you. Can one perform cvs
> commits and GIT updates from the same source dir?
The basic commands are very similar to CVS. IMHO the biggest three
differences are:
- no server needed ("git commit" commits to the .git directory)
- no "cvs update", as there can be many servers, but
"git fetch <url>"
- you can switch branches easily by "git checkout <branch>"
So, typically I just update with
git fetch origin
which updates my origin branch to what was in CVS this morning. Then, I
just create a throw-away branch to hack on lilypond:
git checkout -b wonderfulNewWork origin
This sets up a branch "wonderfulNewWork" starting at the HEAD of "origin".
Now I hack on lilypond as much as I want. At the same mile-stones as with
CVS, I commit with
git commit -a -m "a short comment to remember what I did"
The "-a" means "all changes". If I were to commit only the changes to a
couple of files, it would do
git commit -m "some other comment" GNUmakefile flower/random.cxx
After a couple of days of work, I do the equivalent to "cvs update":
git pull origin
Note the "pull", not "fetch". It means to pull the "origin" branch, and
merge it into the current branch. Then I get the patch with
git diff origin > my.patch
Actually, you can do more quite cool things with git. For example, you can
look at the history with "git log". And if you want to see the patches
right away, do "git log -p" to see the patch after each commit. To do that
with the branch "origin" instead of the current one, do
"git log -p origin".
You can use the "pickaxe" to search when a function or variable or
whatever was added: "git log -Sthefunction" will show you only the commits
where the patch contains "thefunction". If you know which file contains
it, you can make that even faster with "git log -Sthefunction
that/file.c".
Of course, there is at least one down-side, too. Since there is no central
server, you actually have all the history in the .git folder. In packed
format this means about 55 megabyte for lilypond.
Ah, and the most important thing: you can clone the initial repository by
git clone http://wbgn013.biozentrum.uni-wuerzburg.de/lilypond.git
This downloads the 55meg and sets up a local clone in the folder
"lilypond". Please be nice to the server...
Ciao,
Dscho
Re: Yet another 2 patches for music streams, Erik Sandberg, 2006/05/23
Re: Yet another 2 patches for music streams, Han-Wen Nienhuys, 2006/05/24
Re: Yet another 2 patches for music streams, Erik Sandberg, 2006/05/29