|
|
|
|
|
by bboygravity
497 days ago
|
|
Totally. That hole is very easily dug with git: use ctrl x ctrl v to move files around
commit
boom, you've lost history for those files (file tracking only works in theory, not in real life), let's say you don't notice (very easy to not notice) commit some more, merge discover your mistake tons of commits back good luck fixing that, without digging a bigger hole. And that's one of 100's of examples in which git just is really really not fun or user friendly. |
|
This is one of the things git excels at: You didn't lose your history because that's not how git handles it. Git might be the only version control that can actually handle your case (renaming files without using a special command) - it looks for file similarity between a deleted file and an added file in the same commit, with various flags to make this look in broader places.
"git mv file1 file2" is almost identical to "mv file1 file2" + "git add file1 file2" (it also handles unstaged changes instead staging them)