{"thread":{"id":"47889","subject":"I'm trying to break \"git pull --rebase\"","startedAt":"2018-02-20T22:00:10Z","lastAt":"2018-02-20T22:21:43Z","messageCount":3,"participants":["Julius Musseau","Stefan Beller","Martin Langhoff"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"339749","messageId":"CAA7Zk=vWdEUnrfBcxCH6WAFH9Jss7T9_zK-zMnWbVO7B+2YySw@mail.gmail.com","threadId":"47889","inReplyTo":null,"subject":"I'm trying to break \"git pull --rebase\"","fromName":"Julius Musseau","fromEmail":"julius@mergebase.com","sentAt":"2018-02-20T22:00:00Z","receivedAt":"2018-02-20T22:00:10Z","isPatch":false,"sender":{"key":"julius@mergebase.com","avatar":null},"body":"Hi, Git Developers,\n\nI'm currently writing a blog post about \"git pull --rebase\".   The\npoint of the blog post is to examine scenarios where two people are\nworking together on a short-lived feature branch, where history\nrewrites are allowed, and where both are using \"git pull --rebase\" to\nstay in sync with each other.\n\nI was hoping to concoct a situation where \"git pull --rebase\" makes a\nmess of things.\n\nSo far I have been unable to do this.  I tried version v1.7.2 of Git\nas well as version v2.14.1, and as far as I can tell, \"git pull\n--rebase\" is bulletproof.\n\nDoes anyone here happen to know a situation where \"git pull --rebase\"\nmakes a mess?\n\nHere's a draft of the blog post:\n\nTitle:  \"(Too much) fun with git pull --rebase\"\n\nhttps://mergebase.com/doing-git-wrong/2018/02/17/fun-with-git-pull-rebase/\n\n\nHere are the \"git pull --rebase\" scenarios I've tested so far:\n\n1.  origin/feature rebased against origin/master\n\n2.  origin/feature squash-merged against origin/master\n\n3.  origin/feature squashed in-place`\n\n4.  origin/feature dropped a commit\n\n5.  origin/feature insanity (adjusted merge-base, reversed commits,\nsquashed some commits)\n\n6.  undo of 5\n\n\nSo far \"git pull --rebase\" does the exact right thing in every case!\n\nIf anyone knows a scenario where \"git pull --rebase\" fails to do the\nright thing, I would be very grateful to hear of it.\n\n\n\nThanks!\n\nyours sincerely,\n\nJulius Musseau\n"},{"id":"339751","messageId":"CAGZ79kbXvNqAvrkH-=S_bb-VRPGd4Lj7-vvnPh73HavV7kM9zw@mail.gmail.com","threadId":"47889","inReplyTo":"CAA7Zk=vWdEUnrfBcxCH6WAFH9Jss7T9_zK-zMnWbVO7B+2YySw@mail.gmail.com","subject":"Re: I'm trying to break \"git pull --rebase\"","fromName":"Stefan Beller","fromEmail":"sbeller@google.com","sentAt":"2018-02-20T22:08:40Z","receivedAt":"2018-02-20T22:08:49Z","isPatch":false,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"On Tue, Feb 20, 2018 at 2:00 PM, Julius Musseau <julius@mergebase.com> wrote:\n> Hi, Git Developers,\n>\n> I'm currently writing a blog post about \"git pull --rebase\".   The\n> point of the blog post is to examine scenarios where two people are\n> working together on a short-lived feature branch, where history\n> rewrites are allowed, and where both are using \"git pull --rebase\" to\n> stay in sync with each other.\n>\n> I was hoping to concoct a situation where \"git pull --rebase\" makes a\n> mess of things.\n>\n> So far I have been unable to do this.  I tried version v1.7.2 of Git\n> as well as version v2.14.1, and as far as I can tell, \"git pull\n> --rebase\" is bulletproof.\n>\n> Does anyone here happen to know a situation where \"git pull --rebase\"\n> makes a mess?\n\nIf you are inclined to experiment with submodules,\nI would have an easy answer for you. :)\n\nBut instead of giving an answer myself (as I love reading about\nthings the usual mailing list folks miss),\nmaybe this is a good starting point to poke at things\nhttps://github.com/git/git/commit/a6d7eb2c7a6a402a938824bcf1c5f331dd1a06bb\n\nFor the non-submodule use case, I would think pull is pretty solid,\nas you lay out in your blog draft.\n\n(If you finish by Wednesday 21st), you may be interested in\nsubmitting to Git rev-news (or a later edition if you take time writing)\nhttps://public-inbox.org/git/CAP8UFD1HPruE3N_0k8_TFreBML9V8K=SS8LqD-XkeEuheSmGvw@mail.gmail.com/\n\nThanks,\nStefan\n"},{"id":"339753","messageId":"CACPiFCK_-qw72QgKziCWzSPJtDN+w1PrbDu5Qk1MVj220WKZ-A@mail.gmail.com","threadId":"47889","inReplyTo":"CAA7Zk=vWdEUnrfBcxCH6WAFH9Jss7T9_zK-zMnWbVO7B+2YySw@mail.gmail.com","subject":"Re: I'm trying to break \"git pull --rebase\"","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2018-02-20T22:21:17Z","receivedAt":"2018-02-20T22:21:43Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Tue, Feb 20, 2018 at 5:00 PM, Julius Musseau <julius@mergebase.com> wrote:\n> I was hoping to concoct a situation where \"git pull --rebase\" makes a\n> mess of things.\n\nIt breaks quite easily with some workflows. They are all in the \"don't\ndo that\" territory.\n\nOpen a long-lived feature-dev branch, work on it. Other folks are\nworking on master. Merge master into feature-dev. Make sure some\nmerges might need conflict resolution.\n\nReorg some code on master, move files around. Code some more on\nfeature-dev branch. Merge master into feature-dev; the merge machinery\nwill probably cope with the code move, file renames. If it doesn't,\nresolve it by hand.\n\nLet all that simmer for a little bit.\n\nThen try to rebase.\n\n\"Doctor, it hurts when I rebase after merging with conflict resolution... \"\n\ncheers,\n\n\n\nm\n"}]}