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: Jonathan Kulp
Subject: Re: CM 1.1 git question
Date: Thu, 19 Feb 2009 10:53:45 -0600
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

Maximilian Albert wrote:
2009/2/18 Jonathan Kulp <address@hidden>:
Ok I found a typo in the git instructions of CG and followed your
instructions to create the patch using git.  Seems to have worked great!

I remember the times when I was still feeling uncomfortable with git.
The thing is that when you are used to non-distributed version control
systems like subversion, you are scared to do a commit because you
think you might mess up a central repository. But as Carl wrote, with
git the worst you can do is mess up your own repository (and normally
you won't ;-)) as long as you don't do "git push".

So the best thing to do in order to get familiar with git is to create
a dummy repository in a separate directory along with some test files
and happily commit, branch, merge, etc. This way you will get a
feeling for how git behaves. I always found it very useful to inspect
the individual commits and branches with gitk (or qgit if you prefer).
It's much easier to see what git did when you have a graphical
representation.

Also, two things which I learned very late but which are incredibly useful:

1) git commit --amend": instead of creating a new commit, this adds
the currently staged changes to the head commit and allows you to edit
the commit message. *Very* useful for updating commits if you forgot
some changes or misspelled the commit message.

2) "Interactive" rebasing. When you specify the flag "-i" during "git
rebase" then an editor opens and shows the commits which would be
rebased. You can then rearrange them, squash several commits together
or mark them for editing (in which case the rebasing process stops at
that particular commit and allows you to do further changes before
continuing).

By now I use git for almost any work (even writing applications) and
it has incredibly boosted my productivity because I don't need
thousands of backup copies any more and I have become much more
courageous to apply some changes because I know I can always undo
them.

Have fun exploring!
Max


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/

and it looked like it was starting to do it, initializing empty repository and so forth, but then it said it couldn't change directory to /home/jon/Documents/DirectoryName/ and it aborted.

Do you know how to do this?  Thanks Maximilian,

Jon
--
Jonathan Kulp
http://www.jonathankulp.com




reply via email to

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