From: Sean Kelley <hidden> Date: 2016-06-15 22:43:20
I have been having trouble with the following workflow. I am trying
to push changes to a remote from a branch that is tracking it.
git clone git://mysite.com/data/git/linux-devel.git linux-devel
cd linux-devel
git remote add -m master -f linux-stable
git://mysite.com/data/git/linux-stable.git
git branch -r
linux-stable/HEAD
linux-stable/master
origin/HEAD
origin/master
git checkout -b stable linux-stable/master
git cherry-pick b3b1eea69a (a commit from linux-devel)
git push linux-stable
error: remote 'refs/heads/master' is not a strict subset of local ref
'refs/heads/master'. maybe you are not up-to-date and need to pull
first?
error: failed to push to 'git://mysite.com/data/git/linux-stable.git'
Thanks for your help,
Sean
From: Johannes Schindelin <hidden> Date: 2016-06-15 22:43:20
Hi,
On Fri, 6 Jul 2007, Sean Kelley wrote:
[...]
git checkout -b stable linux-stable/master
git cherry-pick b3b1eea69a (a commit from linux-devel)
git push linux-stable
error: remote 'refs/heads/master' is not a strict subset of local ref
'refs/heads/master'. maybe you are not up-to-date and need to pull
first?
error: failed to push to 'git://mysite.com/data/git/linux-stable.git'
Since you are obviously only interested in pushing the stable branch, why
don't you
git push linux-stable stable
Hm?
If you do not specify which branches to push, "git push" will find all
refnames which are present both locally and remotely, and push those.
Evidently, however, your local "master" disagrees with the remote
"master".
Hth,
Dscho
From: Sean Kelley <hidden> Date: 2016-06-15 22:43:20
Hi
On 7/6/07, Johannes Schindelin [off-list ref] wrote:
Hi,
On Fri, 6 Jul 2007, Sean Kelley wrote:
quoted
[...]
git checkout -b stable linux-stable/master
git cherry-pick b3b1eea69a (a commit from linux-devel)
git push linux-stable
error: remote 'refs/heads/master' is not a strict subset of local ref
'refs/heads/master'. maybe you are not up-to-date and need to pull
first?
error: failed to push to 'git://mysite.com/data/git/linux-stable.git'
Since you are obviously only interested in pushing the stable branch, why
don't you
git push linux-stable stable
Hm?
If you do not specify which branches to push, "git push" will find all
refnames which are present both locally and remotely, and push those.
Evidently, however, your local "master" disagrees with the remote
"master".
It is not entirely clear to me from the documentation. So I was
trying to cobble together something that seemed to make sense. I want
to work from the devel clone. On occasion I want to cherry-pick
changesets and push those to the stable branch. I don't want
everything that goes into devel to go into stable.
Sean
Na Fri, Jul 06, 2007 at 09:39:47AM -0500, Sean Kelley [off-list ref] pisal(a):
quoted
quoted
git checkout -b stable linux-stable/master
git cherry-pick b3b1eea69a (a commit from linux-devel)
git push linux-stable
error: remote 'refs/heads/master' is not a strict subset of local ref
'refs/heads/master'. maybe you are not up-to-date and need to pull
first?
error: failed to push to 'git://mysite.com/data/git/linux-stable.git'
Since you are obviously only interested in pushing the stable branch, why
don't you
git push linux-stable stable
Hm?
If you do not specify which branches to push, "git push" will find all
refnames which are present both locally and remotely, and push those.
Evidently, however, your local "master" disagrees with the remote
"master".
It is not entirely clear to me from the documentation. So I was
trying to cobble together something that seemed to make sense. I want
to work from the devel clone. On occasion I want to cherry-pick
changesets and push those to the stable branch. I don't want
everything that goes into devel to go into stable.
what about this?
git push linux-stable stable:master
VMiklos
--
developer of Frugalware Linux - http://frugalware.org
From: Sean Kelley <hidden> Date: 2016-06-15 22:43:20
Hi,
On 7/6/07, VMiklos [off-list ref] wrote:
Na Fri, Jul 06, 2007 at 09:39:47AM -0500, Sean Kelley [off-list ref] pisal(a):
quoted
quoted
quoted
git checkout -b stable linux-stable/master
git cherry-pick b3b1eea69a (a commit from linux-devel)
git push linux-stable
error: remote 'refs/heads/master' is not a strict subset of local ref
'refs/heads/master'. maybe you are not up-to-date and need to pull
first?
error: failed to push to 'git://mysite.com/data/git/linux-stable.git'
Since you are obviously only interested in pushing the stable branch, why
don't you
git push linux-stable stable
Hm?
If you do not specify which branches to push, "git push" will find all
refnames which are present both locally and remotely, and push those.
Evidently, however, your local "master" disagrees with the remote
"master".
It is not entirely clear to me from the documentation. So I was
trying to cobble together something that seemed to make sense. I want
to work from the devel clone. On occasion I want to cherry-pick
changesets and push those to the stable branch. I don't want
everything that goes into devel to go into stable.
what about this?
git push linux-stable stable:master
That creates a new head on my remote server. Where as I wanted to
push to the remotes head.
Sean
From: Sean Kelley <hidden> Date: 2016-06-15 22:43:20
On 7/6/07, Sean Kelley [off-list ref] wrote:
I have been having trouble with the following workflow. I am trying
to push changes to a remote from a branch that is tracking it.
Is there a better way to do this? Basically I want to push from the
branch to the remote. But it doesn't seem to work at least without
pushing the branch itself as a new head to the remote. Perhaps the
better way to do it is to have two different directories:
1) clone the linux-devel.git and have a read-only remote to
linux-stable to fetch changes and cherry-pick.
2) clone the linux-stable.git and have a read-only remote to
linux-devel to fetch changes and cherry-pick
So you would just cd to the specific one you want to work with.
Sean
git clone git://mysite.com/data/git/linux-devel.git linux-devel
cd linux-devel
git remote add -m master -f linux-stable
git://mysite.com/data/git/linux-stable.git
git branch -r
linux-stable/HEAD
linux-stable/master
origin/HEAD
origin/master
git checkout -b stable linux-stable/master
git cherry-pick b3b1eea69a (a commit from linux-devel)
git push linux-stable
error: remote 'refs/heads/master' is not a strict subset of local ref
'refs/heads/master'. maybe you are not up-to-date and need to pull
first?
error: failed to push to 'git://mysite.com/data/git/linux-stable.git'
Thanks for your help,
Sean