[Ecls-list] Important: Repository changes

Michael Wood esiotrot at gmail.com
Tue Aug 14 06:46:08 UTC 2012


Hi

On 11 August 2012 09:25, Matthew Mondor <mm_lists at pulsar-zone.net> wrote:
> On Thu, 26 Jul 2012 16:15:19 +0200
> Juan Jose Garcia-Ripoll <juanjose.garciaripoll at gmail.com> wrote:
>
>> Unexpectedly, the addresses for the git repositories have changed with the
>> upgrade. We now have both http and git access and the new addresses (read
>> only) are
>>
>> git clone git://git.code.sf.net/p/ecls/ecl ecls-ecl
>> git clone git://git.code.sf.net/p/ecls/ecl-doc ecls-ecl-doc
>
> I must say that I have little experience with Git, having first used it
> with this project.
>
> For some time I would occasionally simply try a "git pull" in case
> sourceforge could still use the repository my git tree was configured
> to use, but there seemed to be no more updates.
>
> So I tried to tell git to select a new remote master:
>
> $ git remote rm origin
> $ git remote add origin git://git.code.sf.net/p/ecls/ecl
> $ git config master.remote origin
> $ git config master.merge refs/heads/master

I've just tried this and the above is almost correct.

The above commands just change stuff in your .git/config file inside
the repository, so you could just edit with a text editor.

The original version looks like this (ignoring [core]):

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git://ecls.git.sourceforge.net/gitroot/ecls/ecl
[branch "master"]
	remote = origin
	merge = refs/heads/master

After your commands above it looks like this:

[branch "master"]
[remote "origin"]
	url = git://git.code.sf.net/p/ecls/ecl
	fetch = +refs/heads/*:refs/remotes/origin/*
[master]
	remote = origin
	merge = refs/heads/master

So clearly it's added a [master] section instead of changing [branch "master"].

Instead of "git config master..." you want "git config branch.master...":

$ git config branch.master.remote origin
$ git config branch.master.merge refs/heads/master

> Yet if I try simply "git pull", I get an error that I should now
> specify a branch.

"git pull" is basically just an automated "git fetch ..." followed by
"git merge ...", so you could do "git pull origin" followed by "git
merge origin/master", or you could do "git pull repository branch",
but if you fix the config this will not be necessary, of course.

> If I try "git pull master" I get another error that
> the repository doesn't exist...

This is because you did not specify the repository.  You would have needed:

git pull origin master

> Fortunately I had kept a backup of the working tree before beginning my
> tests to switch remote repository, but it is still configured for the
> old one:
>
> $ git remote -v
> origin  git://ecls.git.sourceforge.net/gitroot/ecls/ecl (fetch)
> origin  git://ecls.git.sourceforge.net/gitroot/ecls/ecl (push)
> $ git pull
> Already up-to-date. (no connection error, though)
>
> I'd gladly follow suggestions from someone who has more Git
> experience :)
>
> Thanks,
> --
> Matt

-- 
Michael Wood <esiotrot at gmail.com>




More information about the ecl-devel mailing list