From: Ben Knoble Date: Tue, 26 May 2026 21:29:02 GMT Subject: Re: git mv after the fact Message-ID: <85D5E150-BD78-4FC5-83DC-10DEBAC6EA4B@gmail.com> In-Reply-To: > Le 26 mai 2026 à 12:46, Chris Torek a écrit : > > On Tue, May 26, 2026 at 6:18 AM Frieder Hannenheim wrote: >> I'd like to propose a new flag for git mv, that updates the index >> like git mv normally would but does not move the file. ... > > You may already know this, but technically no flag is needed: > you can just "git add" the new name and "git rm" the old one, > with the same effect. Or indeed, « git add old new » should also work, I think. > A flag for "git mv" would be convenient (and slightly more > efficient, not in terms of storage but in terms of CPU time > spent discovering that the contents under the new name > already exist in the object database). But Git will discover > the rename on its own in the usual way regardless of how > you get to that point. > > Chris