How can I swap two files, keeping them marked so in the history?
(Except for doing it manually.)
I’d expect some flag for git mv, like,
git mv --swap foo.txt bar.txt
which would produce
# renamed: foo.txt -> bar.txt
# renamed: bar.txt -> foo.txt
Is there support for this in git?
Git doesn’t actually track renames, it just determines that heuristically based on the changes in content of a particular commit. If you do what you describe, you’ll likely see something like below but it depends on the files.