move-ts
move-ts copied to clipboard
Use Git Mv
This extension would be even better if it did a Git move either by default, or by configuration, when moving files. Right now it marks the old file name as deleted and adds a new file. This makes viewing the real history in Git much harder.
I pretty sure git dpesn't record move in any special way; so shouldn't make a difference if you use git mv or not.
This SO question backs me up:- https://stackoverflow.com/questions/2314652/is-it-possible-to-move-rename-files-in-git-and-maintain-their-history
When you do moves;though you want to keep the other changes to the moved file as small as possible so the git rename detection 'magic' works.
Even if it doesn't make a difference, there could be an option to do git mv
(or git rm
+ git add
) automatically, to avoid having to manually marking the file as moved later.
@rgammans Using git mv
does add both the deletion and the new file into the staging index, meaning that if you subsequently make changes to the new file, those changes are trivially kept separate from the move itself (until you stage the changes) and may make it easier create a commit history that maintains git's knowledge of the file history, even if you forgot to commit immediately after doing the rename.