{"thread":{"id":"57135","subject":"Rebasing commits that have been pushed to remote","startedAt":"2021-12-22T07:55:25Z","lastAt":"2021-12-27T02:28:36Z","messageCount":7,"participants":["Lemuria","Junio C Hamano","Erik Cervin Edin","rsbecker@nexbridge.com"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"444753","messageId":"71b51bc8-172f-48de-7c3f-cf55dc45b39a@gmail.com","threadId":"57135","inReplyTo":null,"subject":"Rebasing commits that have been pushed to remote","fromName":"Lemuria","fromEmail":"nekadek457@gmail.com","sentAt":"2021-12-22T07:55:19Z","receivedAt":"2021-12-22T07:55:25Z","isPatch":false,"sender":{"key":"nekadek457@gmail.com","avatar":"https://gravatar.com/avatar/698ac1484252a484fe71ba301236365b85ee752c166f61ff52461606e150c5f1?d=mp&s=160"},"body":"How do you reword messages of commits that have been pushed to remotes \n(in this case GitHub)? Do I simply perform an interactive rebase \noperation on the commits and simply push?\n"},{"id":"444816","messageId":"xmqqlf0cjuwx.fsf@gitster.g","threadId":"57135","inReplyTo":"71b51bc8-172f-48de-7c3f-cf55dc45b39a@gmail.com","subject":"Re: Rebasing commits that have been pushed to remote","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-12-22T19:34:22Z","receivedAt":"2021-12-22T19:34:26Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Lemuria <nekadek457@gmail.com> writes:\n\n> How do you reword messages of commits that have been pushed to remotes\n> (in this case GitHub)? Do I simply perform an interactive rebase \n> operation on the commits and simply push?\n\nIt is up to each project if it is an acceptable practice to\nrewind-and-rebuild a branch that has already been published, but\nif the projects participants are OK with it, then \"'rebase -i'\nand 'push -f'\" is how you would do it.\n"},{"id":"444852","messageId":"d51b7981-5034-b34c-42d6-ad8b80a378c1@gmail.com","threadId":"57135","inReplyTo":"xmqqlf0cjuwx.fsf@gitster.g","subject":"Re: Rebasing commits that have been pushed to remote","fromName":"Lemuria","fromEmail":"nekadek457@gmail.com","sentAt":"2021-12-23T03:11:32Z","receivedAt":"2021-12-23T03:11:36Z","isPatch":false,"sender":{"key":"nekadek457@gmail.com","avatar":"https://gravatar.com/avatar/698ac1484252a484fe71ba301236365b85ee752c166f61ff52461606e150c5f1?d=mp&s=160"},"body":"Alright. I'll take this into account. Unfortunately, before you got to \nme, I reworded the commits on my local and pushed them to the remote, \nwhich resulted in a messy history with duplicate comments.\n\nThe project in question is a public project of mine, and I'm the only \nperson actively working on it, so I guess rewinding and rebuilding is \nacceptable per my standards.\n\nBut at least my GitHub page has more green on it!\n\nAnd I definitely will rebase -i and push -f next time I need to rewrite \nsome remote history.\n-----------------------------------------------------------------------\n\nOn 23/12/2021 3:34 am, Junio C Hamano wrote:\n> Lemuria <nekadek457@gmail.com> writes:\n> \n>> How do you reword messages of commits that have been pushed to remotes\n>> (in this case GitHub)? Do I simply perform an interactive rebase\n>> operation on the commits and simply push?\n> \n> It is up to each project if it is an acceptable practice to\n> rewind-and-rebuild a branch that has already been published, but\n> if the projects participants are OK with it, then \"'rebase -i'\n> and 'push -f'\" is how you would do it.\n> \n"},{"id":"444964","messageId":"CA+JQ7M_GhE=vcpoCSPEnSPoLA1xZM3uVMuGw4goPe4AmQip2hg@mail.gmail.com","threadId":"57135","inReplyTo":"d51b7981-5034-b34c-42d6-ad8b80a378c1@gmail.com","subject":"Re: Rebasing commits that have been pushed to remote","fromName":"Erik Cervin Edin","fromEmail":"erik@cervined.in","sentAt":"2021-12-26T08:44:18Z","receivedAt":"2021-12-26T08:44:56Z","isPatch":false,"sender":{"key":"erik@cervined.in","avatar":null},"body":"> Alright. I'll take this into account. Unfortunately, before you got to\n> me, I reworded the commits on my local and pushed them to the remote,\n> which resulted in a messy history with duplicate comments.\n\nThis easily happens\nUsually when you merge old history back onto rewritten history\nIt's easy to confuse what is what when rewriting history\n\nIf you find yourself rewriting and force pushing a lot\nyou might find the following script helpful\nhttps://gist.github.com/CervEdin/2e72388c3f7d9b30d961ec3b64d08761\nIt shows:\n- The graphs of differences between local and upstream of a branch\n- The difference between local and upstream\n- Prompts to force push with lease\n\n> But at least my GitHub page has more green on it!\n\nIf you want green you can fork\nhttps://github.com/cervEdin/vanity\n"},{"id":"444965","messageId":"f282b2eb-efd2-e194-d326-fe4daa07b598@gmail.com","threadId":"57135","inReplyTo":"CA+JQ7M_GhE=vcpoCSPEnSPoLA1xZM3uVMuGw4goPe4AmQip2hg@mail.gmail.com","subject":"Re: Rebasing commits that have been pushed to remote","fromName":"Lemuria","fromEmail":"nekadek457@gmail.com","sentAt":"2021-12-26T09:58:26Z","receivedAt":"2021-12-26T09:58:31Z","isPatch":false,"sender":{"key":"nekadek457@gmail.com","avatar":"https://gravatar.com/avatar/698ac1484252a484fe71ba301236365b85ee752c166f61ff52461606e150c5f1?d=mp&s=160"},"body":"\n\nOn 26/12/2021 4:44 pm, Erik Cervin Edin wrote:\n>> Alright. I'll take this into account. Unfortunately, before you got to\n>> me, I reworded the commits on my local and pushed them to the remote,\n>> which resulted in a messy history with duplicate comments.\n> \n> This easily happens\n> Usually when you merge old history back onto rewritten history\n> It's easy to confuse what is what when rewriting history\n> \n> If you find yourself rewriting and force pushing a lot\n> you might find the following script helpful\n> https://gist.github.com/CervEdin/2e72388c3f7d9b30d961ec3b64d08761\n> It shows:\n> - The graphs of differences between local and upstream of a branch\n> - The difference between local and upstream\n> - Prompts to force push with lease\n\nI don't force push a lot, but regardless I'll make a note of\nthat.\n\n> \n>> But at least my GitHub page has more green on it!\n> \n> If you want green you can fork\n> https://github.com/cervEdin/vanity\n> \n\nI'm surprised how GitHub hasn't taken that down yet. Well,\nspamming commits means more green and isn't that good for\nthe environment, right?\n"},{"id":"444966","messageId":"001801d7fa70$25775e20$70661a60$@nexbridge.com","threadId":"57135","inReplyTo":"f282b2eb-efd2-e194-d326-fe4daa07b598@gmail.com","subject":"RE: Rebasing commits that have been pushed to remote","fromName":"","fromEmail":"rsbecker@nexbridge.com","sentAt":"2021-12-26T15:49:14Z","receivedAt":"2021-12-26T15:49:28Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On December 26, 2021 4:58 AM, Lemuria wrote:\n> On 26/12/2021 4:44 pm, Erik Cervin Edin wrote:\n> >> Alright. I'll take this into account. Unfortunately, before you got\n> >> to me, I reworded the commits on my local and pushed them to the\n> >> remote, which resulted in a messy history with duplicate comments.\n> >\n> > This easily happens\n> > Usually when you merge old history back onto rewritten history It's\n> > easy to confuse what is what when rewriting history\n> >\n> > If you find yourself rewriting and force pushing a lot you might find\n> > the following script helpful\n> > https://gist.github.com/CervEdin/2e72388c3f7d9b30d961ec3b64d08761\n> > It shows:\n> > - The graphs of differences between local and upstream of a branch\n> > - The difference between local and upstream\n> > - Prompts to force push with lease\n> \n> I don't force push a lot, but regardless I'll make a note of that.\n\nThe process is used by some teams, like OpenSSL, for WIP pull requests. It follows a git rebase --autosquash -i. The principle is to clean up the PR down to a single final commit for approval. It is more work for the contributor, but the committers seem to prefer having everything in one commit. This requires a git push -f.\n\n> >\n> >> But at least my GitHub page has more green on it!\n> >\n> > If you want green you can fork\n> > https://github.com/cervEdin/vanity\n> >\n> \n> I'm surprised how GitHub hasn't taken that down yet. Well, spamming\n> commits means more green and isn't that good for the environment, right?\n\nI don’t follow this. Sorry.\n\n-Randall\n\n"},{"id":"444992","messageId":"27ee772b-33ec-ca81-364a-6360666e147c@gmail.com","threadId":"57135","inReplyTo":"001801d7fa70$25775e20$70661a60$@nexbridge.com","subject":"Re: Rebasing commits that have been pushed to remote","fromName":"Lemuria","fromEmail":"nekadek457@gmail.com","sentAt":"2021-12-27T02:28:31Z","receivedAt":"2021-12-27T02:28:36Z","isPatch":false,"sender":{"key":"nekadek457@gmail.com","avatar":"https://gravatar.com/avatar/698ac1484252a484fe71ba301236365b85ee752c166f61ff52461606e150c5f1?d=mp&s=160"},"body":"\n\nOn 26/12/2021 11:49 pm, rsbecker@nexbridge.com wrote:\n> On December 26, 2021 4:58 AM, Lemuria wrote:\n>> On 26/12/2021 4:44 pm, Erik Cervin Edin wrote:\n>>>> Alright. I'll take this into account. Unfortunately, before you got\n>>>> to me, I reworded the commits on my local and pushed them to the\n>>>> remote, which resulted in a messy history with duplicate comments.\n>>>\n>>> This easily happens\n>>> Usually when you merge old history back onto rewritten history It's\n>>> easy to confuse what is what when rewriting history\n>>>\n>>> If you find yourself rewriting and force pushing a lot you might find\n>>> the following script helpful\n>>> https://gist.github.com/CervEdin/2e72388c3f7d9b30d961ec3b64d08761\n>>> It shows:\n>>> - The graphs of differences between local and upstream of a branch\n>>> - The difference between local and upstream\n>>> - Prompts to force push with lease\n>>\n>> I don't force push a lot, but regardless I'll make a note of that.\n> \n> The process is used by some teams, like OpenSSL, for WIP pull requests. It follows a git rebase --autosquash -i. The principle is to clean up the PR down to a single final commit for approval. It is more work for the contributor, but the committers seem to prefer having everything in one commit. This requires a git push -f.\n> \n>>>\n>>>> But at least my GitHub page has more green on it!\n>>>\n>>> If you want green you can fork\n>>> https://github.com/cervEdin/vanity\n>>>\n>>\n>> I'm surprised how GitHub hasn't taken that down yet. Well, spamming\n>> commits means more green and isn't that good for the environment, right?\n> \n> I don’t follow this. Sorry.\n> \n> -Randall\n> \n\nMe too. I don't follow that either. My statement\nwas sent with the purposes of ___sarcasm___.\n"}]}