git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Rebasing commits that have been pushed to remote

From
Lemuria <nekadek457@gmail.com>
Date
Dec 27, 2021, 02:28 UTC
Message-ID
<27ee772b-33ec-ca81-364a-6360666e147c@gmail.com>
In-Reply-To
<001801d7fa70$25775e20$70661a60$@nexbridge.com>
On 26/12/2021 11:49 pm, rsbecker@nexbridge.com wrote:
Show 36 quoted lines
> On December 26, 2021 4:58 AM, Lemuria wrote:
>> On 26/12/2021 4:44 pm, Erik Cervin Edin wrote:
>>>> Alright. I'll take this into account. Unfortunately, before you got
>>>> to me, I reworded the commits on my local and pushed them to the
>>>> remote, which resulted in a messy history with duplicate comments.
>>>
>>> This easily happens
>>> Usually when you merge old history back onto rewritten history It's
>>> easy to confuse what is what when rewriting history
>>>
>>> If you find yourself rewriting and force pushing a lot you might find
>>> the following script helpful
>>> https://gist.github.com/CervEdin/2e72388c3f7d9b30d961ec3b64d08761
>>> It shows:
>>> - The graphs of differences between local and upstream of a branch
>>> - The difference between local and upstream
>>> - Prompts to force push with lease
>>
>> I don't force push a lot, but regardless I'll make a note of that.
> 
> 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.
> 
>>>
>>>> But at least my GitHub page has more green on it!
>>>
>>> If you want green you can fork
>>> https://github.com/cervEdin/vanity
>>>
>>
>> I'm surprised how GitHub hasn't taken that down yet. Well, spamming
>> commits means more green and isn't that good for the environment, right?
> 
> I don’t follow this. Sorry.
> 
> -Randall
> 

Me too. I don't follow that either. My statement was sent with the purposes of ___sarcasm___.

Previous: rsbecker@nexbridge.com
Message 7 of 7 in “Rebasing commits that have been pushed to remote”
  1. LemuriaDec 22, 2021
  2. Junio C HamanoDec 22, 2021
  3. LemuriaDec 23, 2021
  4. Erik Cervin EdinDec 26, 2021
  5. LemuriaDec 26, 2021
  6. rsbecker@nexbridge.comDec 26, 2021
  7. LemuriaDec 27, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.