merging branches remotely with git?
I am trying to do a local merge of the linus-kernel git and
the my-wireless-testing git. Is this possible? I have cloned both locally with...
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
git clone git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/my-wireless-testing.git
I thought from the git documentation that I was supposed to be able to create a merge automatically with...
git merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/my-wireless-testing.git
however this reports...
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git - not something we can merge
Any advice on how this can be done would be appreciated.
Jack
Quoted 10 lines · Jack Howarth
I am trying to do a local merge of the linus-kernel git and
the my-wireless-testing git. Is this possible? I have cloned both locally with...git clone
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
git clonegit://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/my-wireless-testing.gitI thought from the git documentation that I was supposed to be able to create a merge automatically with...
Quoted 7 lines
git merge
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.gitgit://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/my-wireless-testing.githowever this reports...
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git- not something we can mergeAny advice on how this can be done would be appreciated.
In the my-wireless-testing directory:
git pull git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
or:
git pull ../linux-2.6.git (which gets it from the other clone you made).
"git merge" is for merging branches you have (copies of) in the same repository. There's also "git fetch" for getting local copies of branches (and tags) elsewhere, and "git pull" does a "fetch" and a "merge", with the ability to put the information only in a temporary location in between.
What part of the documentation confused you? It probably needs to be clarified.
-Daniel
*This .sig left intentionally blank*
Daniel,
If I execute...
git clone git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/my-wireless-testing.git
cd my-wireless-testing
git pull git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
I get the error...
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.
All I want to do is merge the latest linus-kernel git into the my-wireless-testing git so that I can have both the ath9k drivers and the alsa 1.0.17 drivers. What do I need to do to eliminate the above error?
Jack
ps Which git represents the git patches (like 2.6.26-git11) which are placed as patches on the www.kernel.org web page under the section The latest snapshot for the stable Linux kernel tree is:.
Quoted 39 lines · Daniel Barkalow
Quoted 10 lines · Jack Howarth
I am trying to do a local merge of the linus-kernel git and
the my-wireless-testing git. Is this possible? I have cloned both locally with...git clone
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
git clonegit://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/my-wireless-testing.gitI thought from the git documentation that I was supposed to be able to create a merge automatically with...
Quoted 7 lines
git merge
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.gitgit://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/my-wireless-testing.githowever this reports...
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git- not something we can mergeAny advice on how this can be done would be appreciated.
In the my-wireless-testing directory:
git pull
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.gitor:
git pull ../linux-2.6.git (which gets it from the other clone you made).
"git merge" is for merging branches you have (copies of) in the same repository. There's also "git fetch" for getting local copies of branches (and tags) elsewhere, and "git pull" does a "fetch" and a "merge", with the ability to put the information only in a temporary location in between.
What part of the documentation confused you? It probably needs to be clarified.
-Daniel
*This .sig left intentionally blank*
Quoted 7 lines · Jack Howarth
Daniel,
If I execute...git clone
git://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/my-wireless-testing.git
cd my-wireless-testing
git pullgit://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Quoted 5 lines
I get the error...
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.
Ah, sorry. Add " master" to the end of that.
Quoted 3 lines
ps Which git represents the git patches (like 2.6.26-git11) which are placed as patches on the www.kernel.org web page under the section The latest snapshot for the stable Linux kernel tree is:.
Those come from the current state of the master branch of the ...torvalds/linux-2.6 repository as of when they're made, but I don't know how to figure out what -git11 is, as opposed to -git10 or any of the commits done in between.
-Daniel
*This .sig left intentionally blank*
git snapshots (Was: Re: merging branches remotely with git?)
In reply to Jack HowarthHello,
Quoted 3 lines
ps Which git represents the git patches (like 2.6.26-git11) which are placed as patches on the www.kernel.org web page under the section The latest snapshot for the stable Linux kernel tree is:.
AFAIK there is no public tree that contains these tags. But I have a little script that creates them. See below.
Best regards
Uwe
#! /usr/bin/env python
import re
import sys
from urllib2 import urlopen, HTTPError
from subprocess import call
re_version = re.compile('v?(?P<version>2.6.[0-9]+(-rc[0-9]+)?)(?P<snapshot>-git[0-9]+)?') re_hash = re.compile('[0-9a-f]{40}$')
def get(version):
url = 'http://kernel.org/pub/linux/kernel/v2.6/snapshots/patch-%s.id' % version try:
f = urlopen(url)
id = f.read(41).strip()
print id
mo = re_hash.match(id)
if not mo:
return None
call(['git', 'tag', '--', 'v%s' % version, id])
except HTTPError:
print "could not find %s" % version
return None
for arg in sys.argv[1:]:
mo = re_version.match(arg)
if not mo:
print 'skip %r' % arg
continue
if mo.group('snapshot'):
get(mo.group('version') + mo.group('snapshot'))
Signature · 3 lines
Uwe Kleine-König, Software Engineer Digi International GmbH Branch Breisach, Küferstrasse 8, 79206 Breisach, Germany Tax: 315/5781/0242 / VAT: DE153662976 / Reg. Amtsgericht Dortmund HRB 13962
Re: git snapshots (Was: Re: merging branches remotely with git?)
Quoted 7 lines · Uwe Kleine-König
Hello,
Quoted 3 lines
ps Which git represents the git patches (like 2.6.26-git11) which are placed as patches on the www.kernel.org web page under the section The latest snapshot for the stable Linux kernel tree is:.
AFAIK there is no public tree that contains these tags. But I have a little script that creates them. See below.
Yeah, a public repo on git.kernel.org containing only the snapshot tags would be immensely useful.
e.g. Fedora rawhide regularly ships snapshots, so it'd be really nice to be easily look-up what's been merged since a given snapshot:
$> git-fetch linus
$> git-fetch snapshot-tags
$> git-log v2.6.26-git12..linus/master
(That is, assuming the snapshot script couldn't just push the tags to Linus's repo ...)
Cheers,
Mark.
Re: git snapshots (Was: Re: merging branches remotely with git?)
Does anyone know what kernel sources the my-wireless-testing git
is based on? If it is based on the stock 2.6.26 release with only wireless specific patches, perhaps I could just diff it against 2.6.26 to extract the patches needed for ath9k support? I would rather stick to the stable git releases of 2.6.26 for now with the minimum patches applied to get ath9k working on my MacBook Pro.
Jack
Quoted 24 lines · Mark McLoughlin
Quoted 7 lines · Uwe Kleine-König
Hello,
Quoted 3 lines
ps Which git represents the git patches (like 2.6.26-git11) which are placed as patches on the www.kernel.org web page under the section The latest snapshot for the stable Linux kernel tree is:.
AFAIK there is no public tree that contains these tags. But I have a little script that creates them. See below.
Yeah, a public repo on git.kernel.org containing only the snapshot tags would be immensely useful.
e.g. Fedora rawhide regularly ships snapshots, so it'd be really nice to be easily look-up what's been merged since a given snapshot:
$> git-fetch linus
$> git-fetch snapshot-tags
$> git-log v2.6.26-git12..linus/master(That is, assuming the snapshot script couldn't just push the tags to Linus's repo ...)
Cheers,
Mark.
Re: git snapshots (Was: Re: merging branches remotely with git?)
Quoted 6 lines · Jack Howarth
Does anyone know what kernel sources the my-wireless-testing git
is based on? If it is based on the stock 2.6.26 release with only wireless specific patches, perhaps I could just diff it against 2.6.26 to extract the patches needed for ath9k support? I would rather stick to the stable git releases of 2.6.26 for now with the minimum patches applied to get ath9k working on my MacBook Pro.
Jack,
you can run 'git describe' to get a description of how the HEAD relates to the most resent tag. In this case the output of 'v2.6.26-rc9-14207-ga520bdb' suggests that this my-wireless-testing's based on v2.6.26-rc9, or shortly there after.
-Bart
Signature · 1 line
WebSig: http://www.jukie.net/~bart/sig/