lilypond-devel
[Top][All Lists]
Advanced

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

Re: problems with git push and pull


From: Janek Warchoł
Subject: Re: problems with git push and pull
Date: Sun, 21 Aug 2011 21:26:38 +0200

2011/8/21 Reinhold Kainhofer <address@hidden>:
> Am Sunday, 21. August 2011, 20:30:09 schrieb Janek Warchoł:
>> As a nice inauguration of me having git push ability, i broke my
>> repository :)  git pull seems not to work properly.
>>
>> Here's what i did:
>> - in step 6 from here
>> http://lilypond.org/doc/v2.15/Documentation/contributor/commit-access
>> i mistakenly called
>>  config remote.origin.url \
>>   ssh://address@hidden/srv/git/lilypond.git
>> (i.e. i didn't replace 'user' with my username)
>> - when i tried to call it again properly, it refused to work
>> - so i opened .git/config and deleted some lines - apparently too many
>> (that was very smart of me!), after doing so i was able to perform
>> step 6 properly
>
> You could have simply changed user to your login in the .git/config file. No
> need to delete lines there... The "git config" does really nothing else than
> adding/changing lines in .git/config!

...how silly of me!  I wouldn't imagine that i can do such stupid mistakes.

>> - followed remaining steps
>> - called git pull -r on master
>> - checked out a new branch
>> - made changes to authors.itexi (i.e. added myself to develoopment
>> team) and committed them
>> - called 'git push' (while still being on that new branch)
>
> Your commit 32c3ef2b7cdde3abc72738f0173b78f8d28d65c3 ("add Janek Warchol to
> authors") is the current origin/master... Seems to have worked!

Indeed, i see it here
http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=shortlog;h=HEAD

>> - checked out master
>> - called 'git pull -r'.
>> I was pretty sure that in this moment my local master, my new branch
>> and origin/master were all the same.  However, when i called 'git diff
>> origin/master' it showed a lot of differences, including difference in
>> authors.itexi :(  When i call git log, here's what i see:
>
> What does
>   git status
> say?

"# On branch master
nothing to commit (working directory clean)"

> Did the "git pull" give any messages?

I don't remember what it said the first time, but now it says
"From ssh://git.sv.gnu.org/srv/git/lilypond
 * branch            master     -> FETCH_HEAD
Current branch master is up to date."

The second line looks suspicious to me...

> In particular, if there are rebase
> problems, you'll have to resolve them, do "git add [file-name-comes-here]" and
> then continue the rebase with "git rebase --continue". Remember, "git pull -r"
> is the same as "git fetch; git rebase origin/master", so you also need to know
> how to work with rebase (and how to resolve conflicts).

It didn't say anything about conflicts.
I have some very basic experience with solving conflicts, but i don't
know anything about the technical details (how fetch works etc)

> Quite useful is also "git branch"...

I don't understand how git branch is related to my problem?

> BTW, I'm using qgit as graphical frontend, where you can easily see all
> branches, all tags, or look at each patch separately and even see who last
> changed each line of a file.

I tried gitk once and decided that i prefer working with command line,
because it doesn't show me things i don't understand :P

>> And these are the contents of my .git/config:
> [...]
>> [remote "origin"]
>>       url = ssh://address@hidden/srv/git/lilypond.git
>
> Here I also have:
>        fetch = +refs/heads/*:refs/remotes/origin/*
>
> That is not really required if you only intend to work with origin/master. It
> just causes "git fetch" to download all branches on the server (e.g. the
> translations branch, the 2.14 branch, the developer branches, etc.).

I guess i don't need to download those...


2011/8/21 Keith OHara <address@hidden>:
> Janek Warchoł <janek.lilypond <at> gmail.com> writes:
>
>>
>> As a nice inauguration of me having git push ability, i broke my
>> repository :)  git pull seems not to work properly.
>>
>
> Your commit looks fine on the repository, so nothing to worry about there.
>
> I would expect another line in your configuration, added below:
>
>> [remote "origin"]
>>       url = ssh://janekw <at> git.sv.gnu.org/srv/git/lilypond.git
>      fetch = +refs/heads/master:refs/remotes/origin/master
>
> Probably you want to go through CG 3.2.2, Downloading Remote Branches,
> to make sure everything you set up there is still set up.

I'm not sure - can i go through all these (i.e. call 'git remote add
-ft master -m master \ origin git://git.sv.gnu.org/lilypond.git/'
without affecting my work on currently existing local branches?
Or should i simply add that line to .git/config?

I see something interesting: it's written here
http://lilypond.org/doc/v2.15/Documentation/contributor/commit-access
that when i call 'git pull --verbose' it should say "(...) From
ssh://address@hidden/srv/git/lilypond (...)".  When i try it, it
says "From ssh://git.sv.gnu.org/srv/git/lilypond" (i.e. without any
username).

I attach what i see when i call 'git diff origin/master'.
Another clue: when i call 'git format-patch origin/master' it creates
17 patches, beginning with "Doc: NR-3.2 titling" (28 hours ago, i
guess that the last time i did a pull before messing with push
settings was sometime before this) up to "Fixed spacing in
space-alist; issue 1785".


2011/8/21 address@hidden <address@hidden>:
>
> On Aug 21, 2011, at 8:30 PM, Janek Warchoł wrote:
>
> commit 9c319db89ecc46cbf6c9c35e759eba973e412bb0
> Merge: 49ef4f0 fb47959
> Author: Mike Solomon <address@hidden>
> Date:   Sun Aug 21 17:19:28 2011 +0200
>
>    Merge branch 'master' of ssh://git.sv.gnu.org/srv/git/lilypond
>
> For the record, I don't remember doing this.  Does anyone know how this
> sorta thing happens?

I can only say that it is also present here:
http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=shortlog;h=refs/heads/master

thanks,
Janek

Attachment: git diff origin-master.diff
Description: Binary data


reply via email to

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