{"thread":{"id":"10811","subject":"Local branch to remote branch translation","startedAt":"2007-11-11T17:54:41Z","lastAt":"2007-11-12T13:53:34Z","messageCount":10,"participants":["Jon Smirl","Steffen Prohaska"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"59352","messageId":"9e4733910711110954m3ed3f9adtf19ca15dff61f0@mail.gmail.com","threadId":"10811","inReplyTo":null,"subject":"Local branch to remote branch translation","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2007-11-11T17:54:41Z","receivedAt":"2007-11-11T17:54:41Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"What am I doing wrong in this sequence?\n\nIn my local repo I have two remotes:\n\njonsmirl@terra:~/mpc5200b$ git remote\ndreamhost\nlinus\n\nI create branches off from these using:\ngit branch -b m29 linus/master\n\nI update them with\nstg rebase linus/master\n\nMy repo has a .git/packed-refs file\n\nWhen I push this repo to a remote server my local branches get renamed.\n\njonsmirl@terra:~/mpc5200b$ git push dreamhost\nTo ssh://jonsmirl1@git.digispeaker.com/~/mpc5200b.git\n * [new branch]      m24 -> linus/m24\n * [new branch]      m25 -> linus/m25\n * [new branch]      m26 -> linus/m26\n * [new branch]      m28 -> linus/m28\n * [new branch]      m29 -> linus/m29\nCounting objects: 619084, done.\n...\n\nSo one the remote server I see this:\n\n[daedalus]$ git remote\n[daedalus]$ git branch\n[daedalus]$ git branch -r\n  linus/m24\n  linus/m25\n  linus/m26\n  linus/m28\n  linus/m29\n[daedalus]$\n\nWith the repo in this state at the remote server gitweb thinks the\nrepo is empty.\nWhy are these branches getting renamed?\n\ngit head is in use on both ends.\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"59354","messageId":"9e4733910711111002x2f8cabf7yce263faf7b33bde1@mail.gmail.com","threadId":"10811","inReplyTo":"9e4733910711110954m3ed3f9adtf19ca15dff61f0@mail.gmail.com","subject":"Re: Local branch to remote branch translation","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2007-11-11T18:02:00Z","receivedAt":"2007-11-11T18:02:00Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"Is the remote config not correct?\n\n[remote \"dreamhost\"]\n        url = ssh://jonsmirl1@git.digispeaker.com/~/mpc5200b.git\n        fetch = +refs/heads/*:refs/remotes/dreamhost/*\n        push = +refs/heads/*:refs/remotes/linus/*\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"59355","messageId":"A1B9CE91-15E0-4298-A606-68BB31541574@zib.de","threadId":"10811","inReplyTo":"9e4733910711111002x2f8cabf7yce263faf7b33bde1@mail.gmail.com","subject":"Re: Local branch to remote branch translation","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-11-11T18:19:22Z","receivedAt":"2007-11-11T18:19:22Z","isPatch":false,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"\nOn Nov 11, 2007, at 7:02 PM, Jon Smirl wrote:\n\n> Is the remote config not correct?\n\nThis is the configuration for remote \"dreamhost\". In your\nprevious mail you also mentioned a remote \"linus\". But\nthis seems to be unrelated to your question.\n\n\n> [remote \"dreamhost\"]\n>         url = ssh://jonsmirl1@git.digispeaker.com/~/mpc5200b.git\n>         fetch = +refs/heads/*:refs/remotes/dreamhost/*\n\ncorrect. This fetches the branches from the remote and stores\nthem locally as remote tracking branches \"dreamhost/<branch>\".\n\n>         push = +refs/heads/*:refs/remotes/linus/*\n\nThis \"renames\" your branches when you push. Your local branches\nget pushed to \"dreamhost\" and are stored there as remote branches\n\"linus/<branch>\". From your previous mail I assume you like to store\nthem as normal branches. You'd need to say\n\n\tpush = +refs/heads/*:refs/heads/*\n\nBut most likely you don't want to force here, that is drop '+'.\nAnd you don't need to explicitly say that you want to store a branch\nunder the same name. So, probably you want\n\n\tpush = refs/heads/*\n\nBut maybe you could even drop the push line completely. Then, only\nexisting branches would be pushed and if you want to create a new\nremote branch on \"dreamhost\" you'd need to explicitly tell git with\n\n\tgit push dreamhost <new-branch>\n\nDoes this help?\n\t\n\tSteffen\n"},{"id":"59360","messageId":"9e4733910711111136s20616468sd70b4bb19e7f3d0c@mail.gmail.com","threadId":"10811","inReplyTo":"A1B9CE91-15E0-4298-A606-68BB31541574@zib.de","subject":"Re: Local branch to remote branch translation","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2007-11-11T19:36:11Z","receivedAt":"2007-11-11T19:36:11Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 11/11/07, Steffen Prohaska <prohaska@zib.de> wrote:\n>\n> On Nov 11, 2007, at 7:02 PM, Jon Smirl wrote:\n>\n> > Is the remote config not correct?\n>\n> This is the configuration for remote \"dreamhost\". In your\n> previous mail you also mentioned a remote \"linus\". But\n> this seems to be unrelated to your question.\n>\n>\n> > [remote \"dreamhost\"]\n> >         url = ssh://jonsmirl1@git.digispeaker.com/~/mpc5200b.git\n> >         fetch = +refs/heads/*:refs/remotes/dreamhost/*\n>\n> correct. This fetches the branches from the remote and stores\n> them locally as remote tracking branches \"dreamhost/<branch>\".\n>\n> >         push = +refs/heads/*:refs/remotes/linus/*\n>\n> This \"renames\" your branches when you push. Your local branches\n> get pushed to \"dreamhost\" and are stored there as remote branches\n> \"linus/<branch>\". From your previous mail I assume you like to store\n> them as normal branches. You'd need to say\n\nI did this part incorrectly. I was trying to push my local definition\nof the linus remote to the dreamhost repo so that when someone clones\ndreamhost linus would be defined in their repo.\n\njonsmirl@terra:~/mpc5200b$ git remote show linus\n* remote linus\n  URL: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git\n\nHow do I push the definition of the linus remote repo?\n\n\n>\n>         push = +refs/heads/*:refs/heads/*\n>\n> But most likely you don't want to force here, that is drop '+'.\n> And you don't need to explicitly say that you want to store a branch\n> under the same name. So, probably you want\n>\n>         push = refs/heads/*\n>\n> But maybe you could even drop the push line completely. Then, only\n> existing branches would be pushed and if you want to create a new\n> remote branch on \"dreamhost\" you'd need to explicitly tell git with\n>\n>         git push dreamhost <new-branch>\n>\n> Does this help?\n>\n>         Steffen\n>\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"59376","messageId":"B5C127C0-04B8-4469-B6DD-C8B5335BBA88@zib.de","threadId":"10811","inReplyTo":"9e4733910711111136s20616468sd70b4bb19e7f3d0c@mail.gmail.com","subject":"Re: Local branch to remote branch translation","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-11-11T20:59:17Z","receivedAt":"2007-11-11T20:59:17Z","isPatch":false,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"\nOn Nov 11, 2007, at 8:36 PM, Jon Smirl wrote:\n\n> On 11/11/07, Steffen Prohaska <prohaska@zib.de> wrote:\n>>\n>> On Nov 11, 2007, at 7:02 PM, Jon Smirl wrote:\n>>\n>>> Is the remote config not correct?\n>>\n>> This is the configuration for remote \"dreamhost\". In your\n>> previous mail you also mentioned a remote \"linus\". But\n>> this seems to be unrelated to your question.\n>>\n>>\n>>> [remote \"dreamhost\"]\n>>>         url = ssh://jonsmirl1@git.digispeaker.com/~/mpc5200b.git\n>>>         fetch = +refs/heads/*:refs/remotes/dreamhost/*\n>>\n>> correct. This fetches the branches from the remote and stores\n>> them locally as remote tracking branches \"dreamhost/<branch>\".\n>>\n>>>         push = +refs/heads/*:refs/remotes/linus/*\n>>\n>> This \"renames\" your branches when you push. Your local branches\n>> get pushed to \"dreamhost\" and are stored there as remote branches\n>> \"linus/<branch>\". From your previous mail I assume you like to store\n>> them as normal branches. You'd need to say\n>\n> I did this part incorrectly. I was trying to push my local definition\n> of the linus remote to the dreamhost repo so that when someone clones\n> dreamhost linus would be defined in their repo.\n>\n> jonsmirl@terra:~/mpc5200b$ git remote show linus\n> * remote linus\n>   URL: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/ \n> linux-2.6.git\n>\n> How do I push the definition of the linus remote repo?\n\nYou can't. Remotes are local to a repository. They cannot be\n\"pushed\" nor will they be \"cloned\" or \"fetched\".\n\n\tSteffen\n"},{"id":"59380","messageId":"9e4733910711111320u1deafe69r96d64babbb893adf@mail.gmail.com","threadId":"10811","inReplyTo":"B5C127C0-04B8-4469-B6DD-C8B5335BBA88@zib.de","subject":"Re: Local branch to remote branch translation","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2007-11-11T21:20:26Z","receivedAt":"2007-11-11T21:20:26Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 11/11/07, Steffen Prohaska <prohaska@zib.de> wrote:\n> > jonsmirl@terra:~/mpc5200b$ git remote show linus\n> > * remote linus\n> >   URL: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/\n> > linux-2.6.git\n> >\n> > How do I push the definition of the linus remote repo?\n>\n> You can't. Remotes are local to a repository. They cannot be\n> \"pushed\" nor will they be \"cloned\" or \"fetched\".\n\nDreamhost is way slow compared to kernel.org, so it is better to clone\nfrom kernel.org first and then pull from dreamhost. What is the right\nsequence of commands so that a new user will end up with a kernel they\ncan use 'git pull' on to get updates from dreamhost? I'll add these to\nthe repo description page.\n\nI'm trying this locally and I can't figure out the right sequence of\ngit command to redirect origin from kernel.org to dreamhost.\n\nDoing this was bad, it messed up my heads.\njonsmirl@terra:~/foo/digispeaker$ git remote rm origin\nerror: unable to resolve reference refs/remotes/origin/master: No such\nfile or directory\nupdate-ref -d refs/remotes/origin/master\n6e800af233e0bdf108efb7bd23c11ea6fa34cdeb: command returned error: 1\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"59386","messageId":"A7871D5B-9E05-4F9B-92AC-B74ECF35460B@zib.de","threadId":"10811","inReplyTo":"9e4733910711111320u1deafe69r96d64babbb893adf@mail.gmail.com","subject":"Re: Local branch to remote branch translation","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-11-11T22:01:44Z","receivedAt":"2007-11-11T22:01:44Z","isPatch":false,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"\nOn Nov 11, 2007, at 10:20 PM, Jon Smirl wrote:\n\n> On 11/11/07, Steffen Prohaska <prohaska@zib.de> wrote:\n>>> jonsmirl@terra:~/mpc5200b$ git remote show linus\n>>> * remote linus\n>>>   URL: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/\n>>> linux-2.6.git\n>>>\n>>> How do I push the definition of the linus remote repo?\n>>\n>> You can't. Remotes are local to a repository. They cannot be\n>> \"pushed\" nor will they be \"cloned\" or \"fetched\".\n>\n> Dreamhost is way slow compared to kernel.org, so it is better to clone\n> from kernel.org first and then pull from dreamhost. What is the right\n> sequence of commands so that a new user will end up with a kernel they\n> can use 'git pull' on to get updates from dreamhost? I'll add these to\n> the repo description page.\n>\n> I'm trying this locally and I can't figure out the right sequence of\n> git command to redirect origin from kernel.org to dreamhost.\n\nHow about the following (untested sequence)\n\n\tmkdir linux-2.6\n\tcd linux-2.6\n\tgit init\n\tgit remote add linus git://git.kernel.org/pub/scm/linux/kernel/git/ \ntorvalds/linux-2.6.git\n\tgit remote add origin ssh://jonsmirl1@git.digispeaker.com/~/ \nmpc5200b.git\n\tgit fetch linus\n\tgit fetch origin\n\tgit checkout -b master origin/master\n\nThe general idea should be correct. You have a non-standard\nsetup, so avoid git-clone.\n\n\tSteffen\n"},{"id":"59396","messageId":"9e4733910711111446u3e19be7ch90cf79f1d3efc3ef@mail.gmail.com","threadId":"10811","inReplyTo":"A7871D5B-9E05-4F9B-92AC-B74ECF35460B@zib.de","subject":"Re: Local branch to remote branch translation","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2007-11-11T22:46:04Z","receivedAt":"2007-11-11T22:46:04Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 11/11/07, Steffen Prohaska <prohaska@zib.de> wrote:\n>\n> On Nov 11, 2007, at 10:20 PM, Jon Smirl wrote:\n>\n> > On 11/11/07, Steffen Prohaska <prohaska@zib.de> wrote:\n> >>> jonsmirl@terra:~/mpc5200b$ git remote show linus\n> >>> * remote linus\n> >>>   URL: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/\n> >>> linux-2.6.git\n> >>>\n> >>> How do I push the definition of the linus remote repo?\n> >>\n> >> You can't. Remotes are local to a repository. They cannot be\n> >> \"pushed\" nor will they be \"cloned\" or \"fetched\".\n> >\n> > Dreamhost is way slow compared to kernel.org, so it is better to clone\n> > from kernel.org first and then pull from dreamhost. What is the right\n> > sequence of commands so that a new user will end up with a kernel they\n> > can use 'git pull' on to get updates from dreamhost? I'll add these to\n> > the repo description page.\n> >\n> > I'm trying this locally and I can't figure out the right sequence of\n> > git command to redirect origin from kernel.org to dreamhost.\n>\n> How about the following (untested sequence)\n>\n>         mkdir linux-2.6\n>         cd linux-2.6\n>         git init\n>         git remote add linus git://git.kernel.org/pub/scm/linux/kernel/git/\n> torvalds/linux-2.6.git\n>         git remote add origin ssh://jonsmirl1@git.digispeaker.com/~/\n> mpc5200b.git\n>         git fetch linus\n>         git fetch origin\n>         git checkout -b master origin/master\n>\n> The general idea should be correct. You have a non-standard\n> setup, so avoid git-clone.\n\nWhat should I do to standardize the setup so that 'clone/pull' will\nwork on it? I created a master branch. I gave up on fighting with\ngitweb and no branch named master.\n\nI'd like to do this, but I can't figure out how.\n\ngit clone linus\nmove origin to digispeaker\ngit pull\n\nThere doesn't seem to be a simple way to redirect the origin.\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"},{"id":"59427","messageId":"1310ED7B-9DA5-47EC-8523-F609A1866384@zib.de","threadId":"10811","inReplyTo":"9e4733910711111446u3e19be7ch90cf79f1d3efc3ef@mail.gmail.com","subject":"Re: Local branch to remote branch translation","fromName":"Steffen Prohaska","fromEmail":"prohaska@zib.de","sentAt":"2007-11-12T06:25:41Z","receivedAt":"2007-11-12T06:25:41Z","isPatch":false,"sender":{"key":"prohaska@zib.de","avatar":"https://avatars.githubusercontent.com/u/217580?v=4"},"body":"\nOn Nov 11, 2007, at 11:46 PM, Jon Smirl wrote:\n\n> On 11/11/07, Steffen Prohaska <prohaska@zib.de> wrote:\n>>\n>> On Nov 11, 2007, at 10:20 PM, Jon Smirl wrote:\n>>\n>>> On 11/11/07, Steffen Prohaska <prohaska@zib.de> wrote:\n>>>>> jonsmirl@terra:~/mpc5200b$ git remote show linus\n>>>>> * remote linus\n>>>>>   URL: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/\n>>>>> linux-2.6.git\n>>>>>\n>>>>> How do I push the definition of the linus remote repo?\n>>>>\n>>>> You can't. Remotes are local to a repository. They cannot be\n>>>> \"pushed\" nor will they be \"cloned\" or \"fetched\".\n>>>\n>>> Dreamhost is way slow compared to kernel.org, so it is better to  \n>>> clone\n>>> from kernel.org first and then pull from dreamhost. What is the  \n>>> right\n>>> sequence of commands so that a new user will end up with a kernel  \n>>> they\n>>> can use 'git pull' on to get updates from dreamhost? I'll add  \n>>> these to\n>>> the repo description page.\n>>>\n>>> I'm trying this locally and I can't figure out the right sequence of\n>>> git command to redirect origin from kernel.org to dreamhost.\n>>\n>> How about the following (untested sequence)\n>>\n>>         mkdir linux-2.6\n>>         cd linux-2.6\n>>         git init\n>>         git remote add linus git://git.kernel.org/pub/scm/linux/ \n>> kernel/git/\n>> torvalds/linux-2.6.git\n>>         git remote add origin ssh://jonsmirl1@git.digispeaker.com/~/\n>> mpc5200b.git\n>>         git fetch linus\n>>         git fetch origin\n>>         git checkout -b master origin/master\n>>\n>> The general idea should be correct. You have a non-standard\n>> setup, so avoid git-clone.\n>\n> What should I do to standardize the setup so that 'clone/pull' will\n> work on it?\n\nPull should work after you checked out origin/master. Pull should\nfetch from origin and merge to local master.\n\nBut I don't see a way how you could use clone for your setup.\n\n\n> I created a master branch. I gave up on fighting with\n> gitweb and no branch named master.\n\nI don't understand your comment about gitweb.\n\n\n> I'd like to do this, but I can't figure out how.\n>\n> git clone linus\n> move origin to digispeaker\n> git pull\n>\n> There doesn't seem to be a simple way to redirect the origin.\n\nI don't know a simple way.\n\n\tSteffen\n"},{"id":"59484","messageId":"9e4733910711120553r6b7e887eke3978c04b2f0b0c4@mail.gmail.com","threadId":"10811","inReplyTo":"1310ED7B-9DA5-47EC-8523-F609A1866384@zib.de","subject":"Re: Local branch to remote branch translation","fromName":"Jon Smirl","fromEmail":"jonsmirl@gmail.com","sentAt":"2007-11-12T13:53:34Z","receivedAt":"2007-11-12T13:53:34Z","isPatch":false,"sender":{"key":"jonsmirl@gmail.com","avatar":"https://gravatar.com/avatar/cff3bf5bfdfa6708b905712ff91f0f9b8aaca161659f38c02b787920d5d28b7e?d=mp&s=160"},"body":"On 11/12/07, Steffen Prohaska <prohaska@zib.de> wrote:\n>\n> On Nov 11, 2007, at 11:46 PM, Jon Smirl wrote:\n>\n> > On 11/11/07, Steffen Prohaska <prohaska@zib.de> wrote:\n> >>\n> >> On Nov 11, 2007, at 10:20 PM, Jon Smirl wrote:\n> >>\n> >>> On 11/11/07, Steffen Prohaska <prohaska@zib.de> wrote:\n> >>>>> jonsmirl@terra:~/mpc5200b$ git remote show linus\n> >>>>> * remote linus\n> >>>>>   URL: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/\n> >>>>> linux-2.6.git\n> >>>>>\n> >>>>> How do I push the definition of the linus remote repo?\n> >>>>\n> >>>> You can't. Remotes are local to a repository. They cannot be\n> >>>> \"pushed\" nor will they be \"cloned\" or \"fetched\".\n> >>>\n> >>> Dreamhost is way slow compared to kernel.org, so it is better to\n> >>> clone\n> >>> from kernel.org first and then pull from dreamhost. What is the\n> >>> right\n> >>> sequence of commands so that a new user will end up with a kernel\n> >>> they\n> >>> can use 'git pull' on to get updates from dreamhost? I'll add\n> >>> these to\n> >>> the repo description page.\n> >>>\n> >>> I'm trying this locally and I can't figure out the right sequence of\n> >>> git command to redirect origin from kernel.org to dreamhost.\n> >>\n> >> How about the following (untested sequence)\n> >>\n> >>         mkdir linux-2.6\n> >>         cd linux-2.6\n> >>         git init\n> >>         git remote add linus git://git.kernel.org/pub/scm/linux/\n> >> kernel/git/\n> >> torvalds/linux-2.6.git\n> >>         git remote add origin ssh://jonsmirl1@git.digispeaker.com/~/\n> >> mpc5200b.git\n> >>         git fetch linus\n> >>         git fetch origin\n> >>         git checkout -b master origin/master\n> >>\n> >> The general idea should be correct. You have a non-standard\n> >> setup, so avoid git-clone.\n> >\n> > What should I do to standardize the setup so that 'clone/pull' will\n> > work on it?\n>\n> Pull should work after you checked out origin/master. Pull should\n> fetch from origin and merge to local master.\n>\n> But I don't see a way how you could use clone for your setup.\n>\n>\n> > I created a master branch. I gave up on fighting with\n> > gitweb and no branch named master.\n>\n> I don't understand your comment about gitweb.\n\nAt http://git.digispeaker.com/\nThe short log, log, tree links won't work unless master exists.\nOnce master is there, everything works.\n\n\n>\n>\n> > I'd like to do this, but I can't figure out how.\n> >\n> > git clone linus\n> > move origin to digispeaker\n> > git pull\n> >\n> > There doesn't seem to be a simple way to redirect the origin.\n>\n> I don't know a simple way.\n>\n>         Steffen\n>\n>\n>\n\n\n-- \nJon Smirl\njonsmirl@gmail.com\n"}]}