[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Renaming files with git not all that bad?
From: |
Andreas Schwab |
Subject: |
Re: Renaming files with git not all that bad? |
Date: |
Thu, 09 Dec 2021 09:43:54 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.90 (gnu/linux) |
On Dez 09 2021, Phil Sainty wrote:
> On 2021-12-09 16:20, Stefan Kangas wrote:
>> The key thing seems to be making sure to make no other changes
>> than the actual moving of the file in a single commit. This
>> is to make it easy for the git heuristics to notice that the
>> file was moved.
>
> That's the right process IMO. If ever I'm going to rename a
> file which has uncommitted changes, I'll stash my changes and
> introduce a separate rename commit for the original file content
> before continuing, for the exact reason of maximising Git's
> ability to detect it.
Git doesn't care. The rename detection is always performed on the two
end points of a diff operation, irrespective of the intervening history.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
Re: Renaming files with git not all that bad?, Yuri Khan, 2021/12/09
Re: Renaming files with git not all that bad?, Stefan Kangas, 2021/12/09
Re: Renaming files with git not all that bad?, Tassilo Horn, 2021/12/10