After doing more research, it turns out git does not actually track file renames.
Compare:
After using git mv
, your git status
will return something like:
renamed: someFileName.ts -> newFileName.ts
After using mv
, your git status
will return something like:
deleted: someFileName.ts
untracked: newFileName.ts
^despite the apparent acknowledgement of a rename, git handles both scenarios identically.
After running git add -- someFileName.ts newFileName.ts
, you will get the same:
renamed: someFileName.ts -> newFileName.ts
Interestingly, this is not the norm for most SCMs. Linus explains the design decision here.
So to answer the original question:
Use the VSCode integrated file explorer for file moves/renames - this updates import paths AND there is no detriment to version control.