lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CM 1.1 git question


From: Carl D. Sorensen
Subject: Re: CM 1.1 git question
Date: Thu, 19 Feb 2009 15:58:45 -0700



On 2/19/09 12:56 PM, "Jonathan Kulp" <address@hidden> wrote:

> Carl D. Sorensen wrote:
>> 
>> 
>> On 2/19/09 9:53 AM, "Jonathan Kulp" <address@hidden> wrote:
>> 
>> 
>>> This sounds really useful.  I'd like to try to get comfortable with git
>>> on a project of my own, something that doesn't have an online repo.  How
>>> do I create a local git version of a directory on my machine?  I tried
>>> creating a new directory to house the new git repo and then doing
>>> 
>>> git-clone ~/Documents/DirectoryName/
>> 
>> You don't have a git repository of your stuff, so you can't clone the
>> repository.
>> 
>> The way I do it is to change to ~/Documents/DirectoryName/ and type
>> 
>> git init
>> 
>> which will create an empty repository in the current directory.  Then you
>> add your files to the repository by typing
>> 
>> git add *
>> 
>> which adds all the files to the staging area, followed by
>> 
>> git commit
>> 
>> which commits them to the repository.  And now you're off and running!
>> 
>> Good luck,
>> 
>> Carl
>> 
>> 
> Thanks Carl & Maximilian for this help.  I've got it going now.  At the
> moment I don't see all the advantages of it for this project but I'm
> getting used to the git commands and conventions at least.  It's a big
> lilypond-book project so it has tons of extra files that get created
> when I compile and I'm not sure if I want git tracking all those or not.
>   It seems unnecessary to track anything but the source code files.
> After I compile, though, and then do "git status" I get an enormous
> number of untracked files created since the last commit.  I just go
> through and add the ones I want tracked, commit them and I'm done I
> guess.  Thanks for the help with git.  I appreciate it and I'm guessing
> this thread will be helpful for other noobs in the future. :)
> 

You should not add any generated files to the repository -- only the source
files.  You can always regenerate the output files at any time.

If you look at the LilyPond repository, you'll see that none of the doc
outputs are part of the repository, only the source files.

If you want to avoid the big list of generated files, you can create a
repository in a different directory from the working directory.  For
example, you might have a directory LilyProjects.  In the LilyProjects
directory, you would do git init.  Then you would have directories for each
project:

LilyProjects/Project1
LilyProjects/Project2

etc.

You would do all your build work in Project1 or Project2, then

cd .. 
to get back to the LilyProjects directory, where you would do your

git commit -a

Of course, the way I'd do it would be to have a window open in the
LilyProjects directory for issuing my git commands, and a different window
open for doing my LilyPond editing.

Just my $.02

Carl





reply via email to

[Prev in Thread] Current Thread [Next in Thread]