Cloning from kernel.org, then switching to another repo

18 messages, 4 authors, 2016-06-15 · open the first message on its own page

Cloning from kernel.org, then switching to another repo

From: Jon Smirl <hidden>
Date: 2016-06-15 22:43:50

I'd like to do this sequence, but I can't figure out how without
editing the config file. There doesn't seem to be a simple command to
move the origin.

git clone linus
move origin to digispeaker.git
git pull

What's the simplest way to do this?

-- 
Jon Smirl
jonsmirl@gmail.com

Re: Cloning from kernel.org, then switching to another repo

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:50

Hi,

On Mon, 12 Nov 2007, Jon Smirl wrote:
I'd like to do this sequence, but I can't figure out how without editing 
the config file. There doesn't seem to be a simple command to move the 
origin.

git clone linus
move origin to digispeaker.git
AKA "git config remote.origin.url <your-digispeaker-url-here>"
git pull
Hth,
Dscho

Re: Cloning from kernel.org, then switching to another repo

From: Jon Smirl <hidden>
Date: 2016-06-15 22:43:50

On 11/12/07, Johannes Schindelin [off-list ref] wrote:
Hi,

On Mon, 12 Nov 2007, Jon Smirl wrote:
quoted
I'd like to do this sequence, but I can't figure out how without editing
the config file. There doesn't seem to be a simple command to move the
origin.

git clone linus
move origin to digispeaker.git
AKA "git config remote.origin.url <your-digispeaker-url-here>"
There is more to this:

jonsmirl@terra:~/foo$ git clone
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
ds
clone.....
jonsmirl@terra:~/foo/ds$ git config remote.origin.url
http://git.digispeaker.com/projects/digispeaker-kernel.git
jonsmirl@terra:~/foo/ds$ git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me either.  Please
name which branch you want to merge on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details on the refspec.

If you often merge with the same branch, you may want to
configure the following variables in your configuration
file:

    branch.master.remote = <nickname>
    branch.master.merge = <remote-ref>
    remote.<nickname>.url = <url>
    remote.<nickname>.fetch = <refspec>

See git-config(1) for details.
jonsmirl@terra:~/foo/ds$
quoted
git pull
Hth,
Dscho

-- 
Jon Smirl
jonsmirl@gmail.com

Re: Cloning from kernel.org, then switching to another repo

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:50

Hi,

On Mon, 12 Nov 2007, Jon Smirl wrote:
On 11/12/07, Johannes Schindelin [off-list ref] wrote:
quoted
On Mon, 12 Nov 2007, Jon Smirl wrote:
quoted
git clone linus
move origin to digispeaker.git
AKA "git config remote.origin.url <your-digispeaker-url-here>"
There is more to this:
You must be hiding something.
jonsmirl@terra:~/foo$ git clone
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git ds
clone.....
This sets up branch.master.{remote,merge} to {origin,master}.
jonsmirl@terra:~/foo/ds$ git config remote.origin.url
http://git.digispeaker.com/projects/digispeaker-kernel.git
This does not change that setting.
jonsmirl@terra:~/foo/ds$ git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me either.  Please
name which branch you want to merge on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details on the refspec.
And this does not come up here.

Maybe you don't have a master branch on digispeaker.

Ciao,
Dscho

Re: Cloning from kernel.org, then switching to another repo

From: Jon Smirl <hidden>
Date: 2016-06-15 22:43:50

On 11/12/07, Johannes Schindelin [off-list ref] wrote:
Hi,

On Mon, 12 Nov 2007, Jon Smirl wrote:
quoted
On 11/12/07, Johannes Schindelin [off-list ref] wrote:
quoted
On Mon, 12 Nov 2007, Jon Smirl wrote:
quoted
git clone linus
move origin to digispeaker.git
AKA "git config remote.origin.url <your-digispeaker-url-here>"
There is more to this:
You must be hiding something.
quoted
jonsmirl@terra:~/foo$ git clone
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git ds
clone.....
This sets up branch.master.{remote,merge} to {origin,master}.
quoted
jonsmirl@terra:~/foo/ds$ git config remote.origin.url
http://git.digispeaker.com/projects/digispeaker-kernel.git
This does not change that setting.
It edited origin:[remote "origin"]
        url = http://git.digispeaker.com/projects/digispeaker-kernel.git
        fetch = +refs/heads/*:refs/remotes/origin/*
quoted
jonsmirl@terra:~/foo/ds$ git pull
You asked me to pull without telling me which branch you
want to merge with, and 'branch.master.merge' in
your configuration file does not tell me either.  Please
name which branch you want to merge on the command line and
try again (e.g. 'git pull <repository> <refspec>').
See git-pull(1) for details on the refspec.
And this does not come up here.

Maybe you don't have a master branch on digispeaker.
At digispeaker remote repo:
[daedalus]$ git branch
  m24
  m25
  m26
  m28
  m29
* master
[daedalus]$

gitweb is at:
git.digispeaker.com

[daedalus]$ cd refs
[daedalus]$ find
.
./heads
./heads/m24
./heads/m25
./heads/m26
./heads/m28
./heads/m29
./heads/master
./tags
[daedalus]$



Ciao,
Dscho

-- 
Jon Smirl
jonsmirl@gmail.com

Re: Cloning from kernel.org, then switching to another repo

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:50

Hi,

On Mon, 12 Nov 2007, Jon Smirl wrote:
On 11/12/07, Johannes Schindelin [off-list ref] wrote:
quoted
On Mon, 12 Nov 2007, Jon Smirl wrote:
quoted
jonsmirl@terra:~/foo$ git clone
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git ds
clone.....
This sets up branch.master.{remote,merge} to {origin,master}.
You haven't shown me that this is set correctly in your set up, and if it 
is, when it stops being correctly set up.

Ciao,
Dscho

Re: Cloning from kernel.org, then switching to another repo

From: Jon Smirl <hidden>
Date: 2016-06-15 22:43:50

On 11/12/07, Johannes Schindelin [off-list ref] wrote:
Hi,

On Mon, 12 Nov 2007, Jon Smirl wrote:
quoted
On 11/12/07, Johannes Schindelin [off-list ref] wrote:
quoted
On Mon, 12 Nov 2007, Jon Smirl wrote:
quoted
jonsmirl@terra:~/foo$ git clone
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git ds
clone.....
This sets up branch.master.{remote,merge} to {origin,master}.
You haven't shown me that this is set correctly in your set up, and if it
is, when it stops being correctly set up.
Running git update-server-info at the remote end fixed it.

I am using 'git push' to send changes, I though that was supposed to
update the server info automatically.

Ciao,
Dscho

-- 
Jon Smirl
jonsmirl@gmail.com

Re: Cloning from kernel.org, then switching to another repo

From: Jon Smirl <hidden>
Date: 2016-06-15 22:43:50

Actually, fetching from kernel.org first and then switching the origin
isn't helping. The host is http only since I can't get access to the
git network port. When I pushed up my local repo it ends up in one big
pack.

I do this:
git clone kernel.org
move the origin
git pull
-- it still pulls down the entire pack and takes an hour

Will this fix it?
at my remote host, first clone from kernel.org
then push my local changes?


-- 
Jon Smirl
jonsmirl@gmail.com

Re: Cloning from kernel.org, then switching to another repo

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2016-06-15 22:43:50


On Mon, 12 Nov 2007, Johannes Schindelin wrote:
On Mon, 12 Nov 2007, Jon Smirl wrote:
quoted
I'd like to do this sequence, but I can't figure out how without editing 
the config file. There doesn't seem to be a simple command to move the 
origin.

git clone linus
move origin to digispeaker.git
AKA "git config remote.origin.url <your-digispeaker-url-here>"
I really think people should at least also mention:

	"Or just edit your .git/config file by hand"

Quite frankly, the latter is *easier* to do. It's really hard to remember 
all the config entry names and then run "git config <entry> <value>". The 
command itself may be fairly simple, but rememberign the options is *not*.

In contrast, when you open up .git/config in your editor, it's all almost 
totally *obvious*.

So telling people to edit the config file is usually much more helpful in 
the long run. 

		Linus

Re: Cloning from kernel.org, then switching to another repo

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:43:50

Hi,

On Mon, 12 Nov 2007, Linus Torvalds wrote:
On Mon, 12 Nov 2007, Johannes Schindelin wrote:
quoted
On Mon, 12 Nov 2007, Jon Smirl wrote:
quoted
I'd like to do this sequence, but I can't figure out how without 
editing the config file. There doesn't seem to be a simple command 
to move the origin.

git clone linus
move origin to digispeaker.git
AKA "git config remote.origin.url <your-digispeaker-url-here>"
I really think people should at least also mention:

	"Or just edit your .git/config file by hand"
FWIW I agree.  The intent of git-repo-config (as it was named then) was to 
have a program for _scripts_ to use.

But for some reasons, people on IRC refuse to edit .git/config by hand.  
*sigh*  Will have to relearn giving proper help.

Thanks,
Dscho

Re: Cloning from kernel.org, then switching to another repo

From: Jon Smirl <hidden>
Date: 2016-06-15 22:43:50

On 11/12/07, Linus Torvalds [off-list ref] wrote:

On Mon, 12 Nov 2007, Johannes Schindelin wrote:
quoted
On Mon, 12 Nov 2007, Jon Smirl wrote:
quoted
I'd like to do this sequence, but I can't figure out how without editing
the config file. There doesn't seem to be a simple command to move the
origin.

git clone linus
move origin to digispeaker.git
AKA "git config remote.origin.url <your-digispeaker-url-here>"
I really think people should at least also mention:

        "Or just edit your .git/config file by hand"

Quite frankly, the latter is *easier* to do. It's really hard to remember
all the config entry names and then run "git config <entry> <value>". The
command itself may be fairly simple, but rememberign the options is *not*.
I finally got everything working. There is still some issue where I
need to run update-server-info manually. The error messages at the
client side when update-server-info needs to be run are not useful.

This sequence does work:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
digispeaker
cd digispeaker
git config remote.origin.url
http://git.digispeaker.com/projects/digispeaker-kernel.git
git pull

Should we allow this instead:
   git remote add origin
http://git.digispeaker.com/projects/digispeaker-kernel.git
and print a message saying the origin was changed? That would teach
people more about how remotes work.


I did need to go back to my server and clone kernel.org first, then
push my changes into it. That step is necessary so that my changes
don't end up in the giant pack along with the base kernel.

It is also a requirement to compile the git tools with NO_MMAP if
there are going to work in a shared hosting environment like
dreamhost. NO_MMAP is the key, changing git config doesn't help.

After my initial clone from kernel.org it only takes a minute now to
pull my in changes.

In contrast, when you open up .git/config in your editor, it's all almost
totally *obvious*.

So telling people to edit the config file is usually much more helpful in
the long run.

                Linus

-- 
Jon Smirl
jonsmirl@gmail.com

Re: Cloning from kernel.org, then switching to another repo

From: Jon Smirl <hidden>
Date: 2016-06-15 22:43:50

On 11/12/07, Johannes Schindelin [off-list ref] wrote:
Hi,

On Mon, 12 Nov 2007, Linus Torvalds wrote:
quoted
On Mon, 12 Nov 2007, Johannes Schindelin wrote:
quoted
On Mon, 12 Nov 2007, Jon Smirl wrote:
quoted
I'd like to do this sequence, but I can't figure out how without
editing the config file. There doesn't seem to be a simple command
to move the origin.

git clone linus
move origin to digispeaker.git
AKA "git config remote.origin.url <your-digispeaker-url-here>"
I really think people should at least also mention:

      "Or just edit your .git/config file by hand"
FWIW I agree.  The intent of git-repo-config (as it was named then) was to
have a program for _scripts_ to use.

But for some reasons, people on IRC refuse to edit .git/config by hand.
*sigh*  Will have to relearn giving proper help.
It is eaiser to put
  git config remote.origin.url
http://git.digispeaker.com/projects/digispeaker-kernel.git
in a cookbook web page sequence than say edit the config file by hand.

I added the cookbook sequence to my git project page.
http://git.digispeaker.com/
Without cloning from kernel.org first it takes an hour to clone from
dreamhost, but what do you want for $5/mth. I'll more to a better host
when traffic picks up.

-- 
Jon Smirl
jonsmirl@gmail.com

Re: Cloning from kernel.org, then switching to another repo

From: Jeff King <hidden>
Date: 2016-06-15 22:43:50

On Mon, Nov 12, 2007 at 12:28:28PM -0500, Jon Smirl wrote:
Actually, fetching from kernel.org first and then switching the origin
isn't helping. The host is http only since I can't get access to the
git network port. When I pushed up my local repo it ends up in one big
pack.

I do this:
git clone kernel.org
move the origin
git pull
-- it still pulls down the entire pack and takes an hour
Yep, the http fetch code doesn't understand about fetching parts of
packs (there was some discussion about using partial HTTP transfers, but
nobody seems to have cared enough to implement it).
Will this fix it?
at my remote host, first clone from kernel.org
then push my local changes?
Yes, it should. The goal is to not put your changes and the upstream
commits in the same pack. You could also push _just_ the upstream
commits first, then in a different push, send your local changes. But
when they get pushed together, they all end up in the same pack.

-Peff

Re: Cloning from kernel.org, then switching to another repo

From: Jeff King <hidden>
Date: 2016-06-15 22:43:50

On Mon, Nov 12, 2007 at 12:21:20PM -0500, Jon Smirl wrote:
Running git update-server-info at the remote end fixed it.

I am using 'git push' to send changes, I though that was supposed to
update the server info automatically.
It is typically triggered by the post-update hook. Make sure that your
remote repo's .git/hooks/post-update has the execute bit set.

-Peff

Re: Cloning from kernel.org, then switching to another repo

From: Jeff King <hidden>
Date: 2016-06-15 22:43:50

On Mon, Nov 12, 2007 at 03:54:59PM -0500, Jon Smirl wrote:
It is eaiser to put
  git config remote.origin.url
http://git.digispeaker.com/projects/digispeaker-kernel.git
in a cookbook web page sequence than say edit the config file by hand.
I think that falls under "scripting" (it's just that your interpreter is
a human).
I added the cookbook sequence to my git project page.
http://git.digispeaker.com/
Without cloning from kernel.org first it takes an hour to clone from
dreamhost, but what do you want for $5/mth. I'll more to a better host
when traffic picks up.
It sounds like you are posting commits on top of Linus' kernel tree. Why
not use repo.or.cz's hosting? It's free, and it _already_ has the
linus-2.6 tree, so you can start a 'fork' and not even waste any space.

-Peff

Re: Cloning from kernel.org, then switching to another repo

From: Jon Smirl <hidden>
Date: 2016-06-15 22:43:50

On 11/12/07, Jeff King [off-list ref] wrote:
On Mon, Nov 12, 2007 at 12:21:20PM -0500, Jon Smirl wrote:
quoted
Running git update-server-info at the remote end fixed it.

I am using 'git push' to send changes, I though that was supposed to
update the server info automatically.
It is typically triggered by the post-update hook. Make sure that your
remote repo's .git/hooks/post-update has the execute bit set.
Execute bit was not set. I just set it for all the scripts. +x is not
getting turned on with a default git init-db. I just made a new repo
to check, no +x on the scripts.

-- 
Jon Smirl
jonsmirl@gmail.com

Re: Cloning from kernel.org, then switching to another repo

From: Jon Smirl <hidden>
Date: 2016-06-15 22:43:50

On 11/12/07, Jeff King [off-list ref] wrote:
On Mon, Nov 12, 2007 at 03:54:59PM -0500, Jon Smirl wrote:
quoted
It is eaiser to put
  git config remote.origin.url
http://git.digispeaker.com/projects/digispeaker-kernel.git
in a cookbook web page sequence than say edit the config file by hand.
I think that falls under "scripting" (it's just that your interpreter is
a human).
quoted
I added the cookbook sequence to my git project page.
http://git.digispeaker.com/
Without cloning from kernel.org first it takes an hour to clone from
dreamhost, but what do you want for $5/mth. I'll more to a better host
when traffic picks up.
It sounds like you are posting commits on top of Linus' kernel tree. Why
not use repo.or.cz's hosting? It's free, and it _already_ has the
linus-2.6 tree, so you can start a 'fork' and not even waste any space.
It's the kernel for a larger embedded project. After I get the kernel
going I will add the user space environment at the same web site.

The project is described at www.digispeaker.com. It is an open source
multi-room audio system. Wifi based to allow easy installation. Uses
the MPC5200B PowerPC chip.

-- 
Jon Smirl
jonsmirl@gmail.com

Re: Cloning from kernel.org, then switching to another repo

From: Jeff King <hidden>
Date: 2016-06-15 22:43:50

On Mon, Nov 12, 2007 at 11:30:17PM -0500, Jon Smirl wrote:
Execute bit was not set. I just set it for all the scripts. +x is not
I assume by "all the scripts" you mean "all of the post-update scripts
in my repositories" and not "all of the hook scripts in this
repository". Because I think some of the included hooks are not suitable
to run without some configuration, which is why they are disabled by
default.
getting turned on with a default git init-db. I just made a new repo
to check, no +x on the scripts.
Right. git-init just copies the files from the templates directory
(probably /usr/share/git-core/templates or similar), so if the hook is
not enabled there, it will not be in the new repo. And git ships with
all hooks disabled by default.

cogito used to enable the post-update hook by default for bare repos (if
you called cg-admin-setuprepo), but git never has.

It is mentioned in the "exporting a git repository via http" section of
the user manual.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help