{"thread":{"id":"23723","subject":"Instead of rebasing, etc....?","startedAt":"2010-05-06T22:42:15Z","lastAt":"2010-05-10T08:49:46Z","messageCount":4,"participants":["Dave Abrahams","Raja R Harinath","Ramkumar Ramachandra"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"141097","messageId":"loom.20100507T003055-527@post.gmane.org","threadId":"23723","inReplyTo":null,"subject":"Instead of rebasing, etc....?","fromName":"Dave Abrahams","fromEmail":"dave@boostpro.com","sentAt":"2010-05-06T22:42:15Z","receivedAt":"2010-05-06T22:42:15Z","isPatch":false,"sender":{"key":"dave@boostpro.com","avatar":"https://gravatar.com/avatar/df0921f05114687777894565de21c052fb137ba7c303a399528b43d08833f065?d=mp&s=160"},"body":"I often find myself pursuing a development branch that I'm pushing out\nto a public repo, and then wanting to go back a few commits and start\nthe end of the branch anew.\n\no-o-o-o origin/dev\n      \\\n       o-o-o dev\n\nOf course then I want to push dev and move origin/dev to refer to it.\nSo I delete and recreate origin/dev.  That's essentially like\nrebasing, and all the advice says \"don't do it.\"  How bad is that,\nreally, if it's my own development branch?\n\nIf I try to avoid doing that I guess I have to \"merge\" with the remote\nbranch but discard all its changes?\n\no-o-o-o - - - -o origin/dev dev\n       \\      / \n        o-o-o \n\n\nIs there a shortcut for that?  It would be nice if Git had a way to\nnote that sort of \"false parentage\" (the dotted line above)\nexplicitly; it's not really there logically; it just helps the\nworkflows to move along smoothly.\n"},{"id":"141099","messageId":"loom.20100507T004928-336@post.gmane.org","threadId":"23723","inReplyTo":"loom.20100507T003055-527@post.gmane.org","subject":"Re: Instead of rebasing, etc....?","fromName":"Dave Abrahams","fromEmail":"dave@boostpro.com","sentAt":"2010-05-06T22:50:30Z","receivedAt":"2010-05-06T22:50:30Z","isPatch":false,"sender":{"key":"dave@boostpro.com","avatar":"https://gravatar.com/avatar/df0921f05114687777894565de21c052fb137ba7c303a399528b43d08833f065?d=mp&s=160"},"body":"Dave Abrahams <dave <at> boostpro.com> writes:\n\n> \n> I often find myself pursuing a development branch ...\n\nSorry, my ASCII art was messed up in the previous message.  \nHere's what I meant:\n\no-o-o-o origin/dev\n   \\\n    o-o-o dev\n\n\no-o-o-o - -o origin/dev dev\n   \\      / \n    o-o-o \n"},{"id":"141358","messageId":"87ljbsdvzp.fsf@hariville.hurrynot.org","threadId":"23723","inReplyTo":"loom.20100507T004928-336@post.gmane.org","subject":"Re: Instead of rebasing, etc....?","fromName":"Raja R Harinath","fromEmail":"harinath@hurrynot.org","sentAt":"2010-05-10T08:03:22Z","receivedAt":"2010-05-10T08:03:22Z","isPatch":false,"sender":{"key":"harinath@hurrynot.org","avatar":"https://avatars.githubusercontent.com/u/4610?v=4"},"body":"Hi,\n\nDave Abrahams <dave@boostpro.com> writes:\n\n> Dave Abrahams <dave <at> boostpro.com> writes:\n>\n>> I often find myself pursuing a development branch ...\n>\n> Sorry, my ASCII art was messed up in the previous message.  \n> Here's what I meant:\n>\n> o-o-o-o origin/dev\n>    \\\n>     o-o-o dev\n>\n>\n> o-o-o-o - -o origin/dev dev\n>    \\      / \n>     o-o-o \n\nYou can use the 'ours' merge strategy.\n\nOn the 'dev' branch, you do\n\n   git merge -s ours origin/dev\n\nNow 'origin/dev' is a parent of the new 'dev', while the tree contents\nhaven't changed.  You can now push 'dev' back to origin without any\nhassles.\n\n- Hari\n"},{"id":"141359","messageId":"AANLkTikikb5rKfxBlqrNfgLQhKRYKZ_e-760vWEMLKQ1@mail.gmail.com","threadId":"23723","inReplyTo":"loom.20100507T003055-527@post.gmane.org","subject":"Re: Instead of rebasing, etc....?","fromName":"Ramkumar Ramachandra","fromEmail":"artagnon@gmail.com","sentAt":"2010-05-10T08:49:46Z","receivedAt":"2010-05-10T08:49:46Z","isPatch":false,"sender":{"key":"r@artagnon.com","avatar":"https://avatars.githubusercontent.com/u/37226?v=4"},"body":"Hi,\n\n> Of course then I want to push dev and move origin/dev to refer to it.\n> So I delete and recreate origin/dev.  That's essentially like\n> rebasing, and all the advice says \"don't do it.\"  How bad is that,\n> really, if it's my own development branch?\n\nIf I understand correctly, you want a non-FF push. Simply develop on\ndev and `git push origin +dev:dev` to force a non-FF push. It's not\nbad at all if your branch isn't public and others aren't pulling from\nit.\n\n-- Ram\n"}]}