lilypond-devel
[Top][All Lists]
Advanced

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

Re: git patch


From: Graham Percival
Subject: Re: git patch
Date: Tue, 05 Dec 2006 16:52:33 -0800
User-agent: Thunderbird 1.5.0.8 (Macintosh/20061025)

Johannes Schindelin wrote:
Hi,

On Tue, 5 Dec 2006, Graham Percival wrote:

I'm reluctant to post to the git mailing list because I'm completely willing
to admit that this is probably a stupid luser problem.  I never seriously

I would like to post your mail (anonymized, of course) to the git list.

OK, I just sent it. (I'm not concerned about not looking like an idiot, but thanks. :)

Hmm. Yes. It would be a pretty good idea, I think, to tell _everybody_ that "git pull" is _the_ equivalent to "cvs update". So, if you cloned your local git repository with "git clone" from the upstream, you can merge the upstream repository with "git pull".

Definitely.

Trying really trivial in-index merge...
Documentation/user/advanced-notation.itely: needs merge
fatal: you need to resolve your current index first

This is really obscure, you're right. What Git means: advanced-notation.itely was not committed yet.

Eh? advanced-notation.itely has been in the tree for over a year! ... oh wait, this is a cvs/git translation thing, right? AFAIK, "committing" means "uploading my changes so other people can get them".

With Git, branches really are a serious tool. Even if Mats and you thought you were working on the same branch, you really were not! Just by using git, you already had your own private branch.

So, before trying to merge your work with Mats' work, you _have_ to commit your changes! This was impossible with CVS, since CVS basically allows only linear development and makes anything else _hard_.

So, first commit your changes, _then_ merge other's work.

I'm pretty certain that I committed all my changes, though... I remember doing "git commit Documentation/user/advanced.itely". When I do "gitk", I can see all my changes. I just can't see any changes that happed after I did my initial checkout.


fatal: Entry '.gitignore' would be overwritten by merge. Cannot merge.

If I'm correct, this means that you have a file named ".gitignore" in your working directory, which is either not versioned yet, or modified.

I have a ".gitignore". I didn't change that file. Git put it there in my initial checkout, somebody (Han-Wen I think) modified that file after I did my checkout, and now git is complaining about it.

How do I tell git "ignore whatever you think I've done to .gitignore. Just go online and give me the most recent version" ? :)


Again, you can just commit it (if it is not already in the repository, you will need to add it with "git add .gitignore"), and _then_ merge your work.

tsubasa:~/usr/src/lilypond gperciva$ git status
# Updated but not checked in:
#   (will commit)
#
#       modified:   .gitignore
#       modified:   Documentation/topdocs/NEWS.tely
#       modified:   Documentation/user/advanced-notation.itely
#       modified:   Documentation/user/basic-notation.itely
#       modified:   Documentation/user/spacing.itely
#       modified:   GNUmakefile.in
#       modified:   SConstruct
#       modified:   THANKS
...

I changed advanced-notation.itely, but everything else was done by other people (mainly Han-Wen). I want to get their changes. Is that what "modified" means? I thought it meant that _I_ had changed a file.


I try to translate:

$ git clone blah blah
$ while (true) {
$    git pull      # get latest changes; you must have a clean working dir
$    vi foo/bar/baz.txt
$    make; make web
$    git commit -a # you will be prompted for a meaningful message
$ # alternatively: git commit foo/bar/baz.txt
$ }

Ok. I think I'll delete my current ~/usr/src/lilypond and start again from scratch.

Cheers
- Graham




reply via email to

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