{"thread":{"id":"10358","subject":"Cloning an StGit repository","startedAt":"2007-10-18T11:56:48Z","lastAt":"2007-10-18T12:51:32Z","messageCount":2,"participants":["Rajkumar S","Karl Hasselström"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"56390","messageId":"64de5c8b0710180456x24031754od7062d504e72b215@mail.gmail.com","threadId":"10358","inReplyTo":null,"subject":"Cloning an StGit repository","fromName":"Rajkumar S","fromEmail":"rajkumars@gmail.com","sentAt":"2007-10-18T11:56:48Z","receivedAt":"2007-10-18T11:56:48Z","isPatch":false,"sender":{"key":"rajkumars@gmail.com","avatar":null},"body":"Hi all,\n\nMy group is  following a remote git repository, and we have some\ncustom private patches, our development is on top of our custom\npatches. So our ideal work flow is to\n\n1. Clone the upstream to a local repo (for our reference of upstream work)\n2. Clone the local repo to an StGit repo, with our custom patches\n3. StGit repo is fetched with git --bare fetch (for git-web)\n3. All of us clone from git-web repo and hack on individual branches\n4. Once a feature is locally developed and tested, it's added to\nStiGit repo as a patch.\n5. We periodically pull from upstream to local StGit repo for updates\n\nWhen I try this work flow,  changes made in Stgit is not getting\nreflected in the git-web repository\n\ngit --bare fetch ../stg_branch my_branch02:my_branch02\nmy_branch02:my_branch02 my_branch01:my_branch01  master:master\n\nremote: Generating pack...\nremote: Done counting 33 objects.\nResult has 21 objects.\nDeltifying 21 objects...\n 100% (21/21) donemote: ne\nTotal 21 (delta 11), reused 0remote:  (delta 0)\nUnpacking 21 objects...\n 100% (21/21) done\n* refs/heads/my_branch02: not updating to non-fast forward branch\n'my_branch02' of ../stg_branch\n  old...new: 64609a4...322d3bf\n* refs/heads/my_branch01: fast forward to branch 'my_branch01' of ../stg_branch\n  old..new: 35a22b1..2fb9b65\n* refs/heads/master: fast forward to branch 'master' of ../stg_branch\n  old..new: 464a9b4..1754e61\n\nIt says\n* refs/heads/my_branch02: not updating to non-fast forward branch\n'my_branch02' of ../stg_branch\n\nmy_branch02 is the StGit managed branch from stg_branch, other normal\nbranchs are getting merged. Since this is StGit managed, fast forward\nmerge is not possible, I guess. So how can I pull in the StGit managed\nchanges to web.git repository?\n\nI have made a script of the testing I have done, and attaching it as a\nfile. It can be run as such in a directory, where it will create some\ngit and stgit repositories, illustrating the problem.\n\nIn the script upstream is my upstream, stg_branch is stgit managed\nbranch, web.git is for git-web, my-project is cloned from web.git and\nmy-project-stgit is cloned from stg_branch.\n\nraj\n"},{"id":"56395","messageId":"20071018125132.GA5403@diana.vm.bytemark.co.uk","threadId":"10358","inReplyTo":"64de5c8b0710180456x24031754od7062d504e72b215@mail.gmail.com","subject":"Re: Cloning an StGit repository","fromName":"Karl Hasselström","fromEmail":"kha@treskal.com","sentAt":"2007-10-18T12:51:32Z","receivedAt":"2007-10-18T12:51:32Z","isPatch":false,"sender":{"key":"kha@treskal.com","avatar":"https://gravatar.com/avatar/f0120c734b5279b345075a28521e1ac66acb20c9913ffe9bf6ae97e53f7f3f13?d=mp&s=160"},"body":"On 2007-10-18 17:26:48 +0530, Rajkumar S wrote:\n\n> git --bare fetch ../stg_branch my_branch02:my_branch02\n> my_branch02:my_branch02 my_branch01:my_branch01  master:master\n[...]\n> It says\n> * refs/heads/my_branch02: not updating to non-fast forward branch\n> 'my_branch02' of ../stg_branch\n>\n> my_branch02 is the StGit managed branch from stg_branch, other\n> normal branchs are getting merged. Since this is StGit managed, fast\n> forward merge is not possible, I guess. So how can I pull in the\n> StGit managed changes to web.git repository?\n\nEither prefix each of the refspects with a + (as in\n+my_branch01:my_branch01), or use the -f flag (which has the same\neffect as using + on all the refspecs). This will allow the refs to be\noverwritten even if it's not a fast-forward.\n\nYou have to do this with StGit-managed branches, since StGit is\nessentially just a convenient way to rebase commits.\n\n-- \nKarl Hasselström, kha@treskal.com\n      www.treskal.com/kalle\n"}]}