Re: Rebasing commits that have been pushed to remote
- From
Lemuria <nekadek457@gmail.com>
- Date
- Dec 23, 2021, 03:11 UTC
- Message-ID
- <d51b7981-5034-b34c-42d6-ad8b80a378c1@gmail.com>
- In-Reply-To
- <xmqqlf0cjuwx.fsf@gitster.g>
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.
The project in question is a public project of mine, and I'm the only person actively working on it, so I guess rewinding and rebuilding is acceptable per my standards.
But at least my GitHub page has more green on it!
And I definitely will rebase -i and push -f next time I need to rewrite some remote history. -----------------------------------------------------------------------
On 23/12/2021 3:34 am, Junio C Hamano wrote:
Show 11 quoted lines
> Lemuria <nekadek457@gmail.com> writes: > >> How do you reword messages of commits that have been pushed to remotes >> (in this case GitHub)? Do I simply perform an interactive rebase >> operation on the commits and simply push? > > It is up to each project if it is an acceptable practice to > rewind-and-rebuild a branch that has already been published, but > if the projects participants are OK with it, then "'rebase -i' > and 'push -f'" is how you would do it. >