{"thread":{"id":"30065","subject":"How to setup git repository for internal collaboration, that can be rebased easily?","startedAt":"2012-03-26T19:08:33Z","lastAt":"2012-03-29T15:16:52Z","messageCount":3,"participants":["Kumar Pande","Neal Kreitzinger"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"187766","messageId":"CANz+fEmN2qm9Nwk4tyg0eCrKPR6WZg4kvqCkhB7TmYw2JKoJJQ@mail.gmail.com","threadId":"30065","inReplyTo":null,"subject":"How to setup git repository for internal collaboration, that can be rebased easily?","fromName":"Kumar Pande","fromEmail":"pandekumar023@gmail.com","sentAt":"2012-03-26T19:08:33Z","receivedAt":"2012-03-26T19:08:33Z","isPatch":false,"sender":{"key":"pandekumar023@gmail.com","avatar":null},"body":"Pardon if this embarrassingly simple question, I am new to git haven't\nfound git-newbies mailing list.\n\nWe have a situation where we want to setup internal git repository that\nwill be based on say linux-3.3 kernel.\n\nThere are about four engineers working on developing things for custom\nhardware. So would create a development branch say companyx-devel and we\nwill commit all of our changes to this compnayx-devel branch.\n\nWe also want to keep upto date with latest kernel, so say if we want to\nmove to latest 3.4-rc4 we could rebase (?) our origin to 3.4-rc4, of course\nfix any of the conflicts we may find etc.\n\nWe are not sure how to  go about setting up the initial import of linux3-3\nkernel into git repository on of my local servers?\n\nWe know we should do following on the server:\n\ngit init --bare\ngit config core.sharedrepository 1\n\nShould we be cloning the linux kernel on the server?\ngit clone path-to-kernel-org-git-tree\n\nOr I should clone the tree from kernel.dot.org client and then push it to my\nlocal git repo?\n\nWe tried cloning the tree from kernel.dot.org on client and pushing it to our\ninternal server but that doesn't push kernel code as cloned directory\nalready has .git directory.\n\nIs there a document/web page one can refer to that might help us handling\nthis scenario?\n\n-Kumar\n"},{"id":"187822","messageId":"CANz+fEk0HJBvHM2Z9kA42kXb7Aq-GL9ASQ+HiT3JgRQe_XpJLQ@mail.gmail.com","threadId":"30065","inReplyTo":"CANz+fEmN2qm9Nwk4tyg0eCrKPR6WZg4kvqCkhB7TmYw2JKoJJQ@mail.gmail.com","subject":"Re: How to setup git repository for internal collaboration, that can be rebased easily?","fromName":"Kumar Pande","fromEmail":"pandekumar023@gmail.com","sentAt":"2012-03-27T05:50:54Z","receivedAt":"2012-03-27T05:50:54Z","isPatch":false,"sender":{"key":"pandekumar023@gmail.com","avatar":null},"body":"On Mon, Mar 26, 2012 at 12:08 PM, Kumar Pande <pandekumar023@gmail.com> wrote:\n> Pardon if this embarrassingly simple question, I am new to git haven't\n> found git-newbies mailing list.\n>\n> We have a situation where we want to setup internal git repository that\n> will be based on say linux-3.3 kernel.\n>\n> There are about four engineers working on developing things for custom\n> hardware. So would create a development branch say companyx-devel and we\n> will commit all of our changes to this compnayx-devel branch.\n>\n> We also want to keep upto date with latest kernel, so say if we want to\n> move to latest 3.4-rc4 we could rebase (?) our origin to 3.4-rc4, of course\n> fix any of the conflicts we may find etc.\n>\n> We are not sure how to  go about setting up the initial import of linux3-3\n> kernel into git repository on of my local servers?\n>\n> We know we should do following on the server:\n>\n> git init --bare\n> git config core.sharedrepository 1\n>\n\nSo this what we have done so far:\n\ngit clone --bare --shared\nhttp://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git\ngit config core.sharedrepository 1\n\nNow on my client side.\n1. I checkout and another user John also cloned this repo using command:\n\n    git clone ssh://gitserver/opt/git/linux.git\n\n2. Now git remote -v shows me\ngit remote -v\norigin\tssh://gitserver/var/git/linux.git (fetch)\norigin\tssh://gitserver/var/git/linux.git (push)\n\n3. created a branch\n    git branch testbranch\n    git checkout testbranch\n    <add some files, edited some files, compile & test>\n    git commit -am \"Testing\"\n\n4. Now I push the testbranch to gitserver using\n      git push origin testbranch\n(this seems to have worked\n     To ssh://gitserver/var/git/linux.git\n        * [new branch]      testbranch -> testbranch\n\n5. Now another user john  can clone this repo and make changes to this\ntestbranch, which I can also pull.\n\nSo we are good so far.\n\nNow we are not clear or confused about is, say in one week or two\nweeks linus updates the top of linux.git and if we want to rebase our\nwork to top of that tree. What exactly do we need to do ?\n\nWould REALLY appreciate the help/guidance...\n\n-Kumar\n"},{"id":"188065","messageId":"4F747CE4.9010609@gmail.com","threadId":"30065","inReplyTo":"CANz+fEk0HJBvHM2Z9kA42kXb7Aq-GL9ASQ+HiT3JgRQe_XpJLQ@mail.gmail.com","subject":"Re: How to setup git repository for internal collaboration, that can be rebased easily?","fromName":"Neal Kreitzinger","fromEmail":"nkreitzinger@gmail.com","sentAt":"2012-03-29T15:16:52Z","receivedAt":"2012-03-29T15:16:52Z","isPatch":false,"sender":{"key":"nkreitzinger@gmail.com","avatar":null},"body":"On 3/27/2012 12:50 AM, Kumar Pande wrote:\n> On Mon, Mar 26, 2012 at 12:08 PM, Kumar Pande<pandekumar023@gmail.com>  wrote:\n>\n> So this what we have done so far:\n>\n> git clone --bare --shared\n> http://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git\n> git config core.sharedrepository 1\n>\nI don't think git-clone --shared does what you think it does.  You \nshould reread the git-clone manpage for --shared.  I haven't used it, \nbut from what I'm reading it doesn't seem to make sense in conjunction \nwith your cloning of git.kernel.org.  Either way, it comes with a \nwarning in the manpage:  http://schacon.github.com/git/git-clone.html\n\"NOTE: this is a possibly dangerous operation; do not  use it unless you \nunderstand what it does...\"\n\nv/r,\nneal\n"}]}