On Thu, May 09, 2024 at 09:48:53AM +0200, Gerd Möllmann wrote: > Po Lu writes: [...] > > Yet after running `git filter-branch' to amend the log message, the > > server refuses to accept the updated state of the repository, which, I > > suppose, is down to my privileges being insufficient to run > > administrator commands. Would one of the project administrators care to > > do the honors? > > > > I dimly recall asking a similar question in the past, so please excuse > > me if I'm repeating myself. Thanks. > > Quote from git filter-branch's man page > > WARNING! The rewritten history will have different object names for all > the objects and will not converge with the original branch. You will not > be able to easily push and distribute the rewritten branch on top of the > original branch. To restate in more detail -- you would have to at least add the -f (--force) flag to your push. That said, the remote repo might be set up to refuse this operation (a sensible thing to do for a public repo, see below). BEWARE: this will break everyone else's "git fetch" aka "git pull" if they have a clone of the repo, because the histories don't match. They would (more or less) have to throw away their local clones and re-clone. With whatever gymnastics it takes to rescue their local changes. So whether you actually want to do this will depend on how many clones of that (part of) the repo you think are out there and whether you think you can talk to the people having one of those. Changing history is hard. Especially if more than one has looked at it :-) Cheers -- t