{"thread":{"id":"20141","subject":"pushing specific branches to a public mirror repos","startedAt":"2009-07-17T08:30:26Z","lastAt":"2009-07-17T10:05:01Z","messageCount":5,"participants":["Graeme Geldenhuys","Johannes Sixt","Bert Wesarg"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"118160","messageId":"h3pcrg$ekk$1@ger.gmane.org","threadId":"20141","inReplyTo":null,"subject":"pushing specific branches to a public mirror repos","fromName":"Graeme Geldenhuys","fromEmail":"graemeg@gmail.com","sentAt":"2009-07-17T08:30:26Z","receivedAt":"2009-07-17T08:30:26Z","isPatch":false,"sender":{"key":"graemeg@gmail.com","avatar":"https://gravatar.com/avatar/fdaae0cf0a07bd33782720fb37ae0450f504d4e04c57c6e8f3517d11d503fdc6?d=mp&s=160"},"body":"Hi,\n\nI cloned a SubVersion repository and am maintaining a Git mirror of it \non GitHub. Here is an example of some of the SubVersion branches that \ngot cloned.\n\nrefs/remotes/cleanroom\nrefs/remotes/fixes_2_0\nrefs/remotes/fixes_2_2\nrefs/remotes/fixes_2_2_0_dos\nrefs/remotes/florian\nrefs/remotes/fpc_2_3\nrefs/remotes/generics\nrefs/remotes/genfunc\nrefs/remotes/trunk\n...\n\nBy default 'git svn' created a \"master\" branch which tracks \n\"remotes/trunk\". This is currently the only branch available on GitHub \nmirror repository and I push it as follows:\n\nOn our server which manages the subversion -> local git repos -> github \nsync process.\n\n  $ cd /path/to/repository/\n  $ git svn fetch\n  $ git push github master\n\nThis works fine. Now I don't have any other local branches or any local \nmodifications (I used to have, but reverted all of them) so now a 'git \nsvn fetch' does clean fast-forward merges without problems.\n\nI currently have the following git config setting for the remote github \nrepository:\n\n[remote \"github\"]\n\turl = git@github.com:graemeg/freepascal.git\n\tpush = +refs/remotes/*:refs/heads/*\n\nAs far as I understand, if I do 'git push github', it is going to push \nall the SubVersion branches (as listed above) as heads to GitHub - but \nthis is not what I want. Many of those branches in SubVersion are old, \noutdated or private development areas.\n\nI only want to push the \"trunk\" and \"fixes_2_2\" SubVersion branches to \nGitHub as heads. How must I change by remote.github.push config setting, \nor must I do a manual push as I do with the local tracking \"master\" branch.\n\nIn summary:\n  * Can I change remote.github.push so that if I run 'git push github'\n    that it will ONLY push remotes/trunk and remotes/fixes_2_2 to\n    GitHub mirror\n\n  * or must I manually push those two to GitHub mirror as follows\n     once off create a tracking branch:\n       $ git branch --track fixes_2_2 remotes/fixes_2_2\n\n     then hourly do the following:\n       $ cd /path/to/repository/\n       $ git svn fetch\n       $ git push github master\n       $ git push github fixes_2_2\n\n\n\nRegards,\n   - Graeme -\n\n-- \nfpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal\nhttp://opensoft.homeip.net/fpgui/\n"},{"id":"118164","messageId":"4A603B7A.6050208@viscovery.net","threadId":"20141","inReplyTo":"h3pcrg$ekk$1@ger.gmane.org","subject":"Re: pushing specific branches to a public mirror repos","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2009-07-17T08:51:06Z","receivedAt":"2009-07-17T08:51:06Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Graeme Geldenhuys schrieb:\n> I currently have the following git config setting for the remote github\n> repository:\n> \n> [remote \"github\"]\n>     url = git@github.com:graemeg/freepascal.git\n>     push = +refs/remotes/*:refs/heads/*\n> \n> I only want to push the \"trunk\" and \"fixes_2_2\" SubVersion branches to\n> GitHub as heads. How must I change by remote.github.push config setting,\n> or must I do a manual push as I do with the local tracking \"master\" branch.\n\nYou can have more than one push line in the config:\n\n    push = +refs/remotes/trunk:refs/heads/trunk\n    push = +refs/remotes/fixes_2_2:refs/heads/fixes_2_2\n\n-- Hannes\n"},{"id":"118165","messageId":"h3pf9d$mo7$1@ger.gmane.org","threadId":"20141","inReplyTo":"4A603B7A.6050208@viscovery.net","subject":"Re: pushing specific branches to a public mirror repos","fromName":"Graeme Geldenhuys","fromEmail":"graemeg@gmail.com","sentAt":"2009-07-17T09:11:59Z","receivedAt":"2009-07-17T09:11:59Z","isPatch":false,"sender":{"key":"graemeg@gmail.com","avatar":"https://gravatar.com/avatar/fdaae0cf0a07bd33782720fb37ae0450f504d4e04c57c6e8f3517d11d503fdc6?d=mp&s=160"},"body":"Johannes Sixt wrote:\n> \n> You can have more than one push line in the config:\n> \n>     push = +refs/remotes/trunk:refs/heads/trunk\n>     push = +refs/remotes/fixes_2_2:refs/heads/fixes_2_2\n\n\nExcellent, thanks. I thought about that, but wasn't sure and did not \nwant to try because I already screwed up the GitHub mirror once before.\n\n\n >     push = +refs/remotes/trunk:refs/heads/trunk\n\nMust this stay as is, or must I push 'remotes/trunk' to 'heads/master'?\n\n\n      push = +refs/remotes/trunk:refs/heads/trunk\nvs\n      push = +refs/remotes/trunk:refs/heads/master\n\n\n From my server...\n$ git ls-remote github\n6b9b6460aa79a4b86c6bb1535b78e4fc555f89d5\tHEAD\n6b9b6460aa79a4b86c6bb1535b78e4fc555f89d5\trefs/heads/master\n\n\nMy local \"master\" branch is currently tracking the refs/remotes/trunk, \nbut for some reason (which I don't understand), if I do a 'git svn \nfetch' by default master branch is not updated. I still have to run 'git \nsvn rebase -l' to get master in sync. Is there something I can change in \nthe config to automate that as well?\n\n\n\nRegards,\n   - Graeme -\n\n-- \nfpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal\nhttp://opensoft.homeip.net/fpgui/\n"},{"id":"118167","messageId":"36ca99e90907170247m7919980l38f8f379d2976c52@mail.gmail.com","threadId":"20141","inReplyTo":"h3pf9d$mo7$1@ger.gmane.org","subject":"Re: pushing specific branches to a public mirror repos","fromName":"Bert Wesarg","fromEmail":"bert.wesarg@googlemail.com","sentAt":"2009-07-17T09:47:18Z","receivedAt":"2009-07-17T09:47:18Z","isPatch":false,"sender":{"key":"bert.wesarg@googlemail.com","avatar":"https://avatars.githubusercontent.com/u/111934?v=4"},"body":"On Fri, Jul 17, 2009 at 11:11, Graeme Geldenhuys<graemeg@gmail.com> wrote:\n> My local \"master\" branch is currently tracking the refs/remotes/trunk, but\n> for some reason (which I don't understand), if I do a 'git svn fetch' by\n> default master branch is not updated. I still have to run 'git svn rebase\n> -l' to get master in sync. Is there something I can change in the config to\n> automate that as well?\nTry 'git svn rebase' instead.\n\nBert\n>\n>\n>\n> Regards,\n>  - Graeme -\n"},{"id":"118168","messageId":"4A604CCD.5090108@viscovery.net","threadId":"20141","inReplyTo":"h3pf9d$mo7$1@ger.gmane.org","subject":"Re: pushing specific branches to a public mirror repos","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2009-07-17T10:05:01Z","receivedAt":"2009-07-17T10:05:01Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Graeme Geldenhuys schrieb:\n> Must this stay as is, or must I push 'remotes/trunk' to 'heads/master'?\n> \n>      push = +refs/remotes/trunk:refs/heads/trunk\n> vs\n>      push = +refs/remotes/trunk:refs/heads/master\n\nBoth are OK. Pick the one that suits your needs.\n\n-- Hannes\n"}]}