Advertisement
Dyrcona

Git rm/mv of identical files

May 21st, 2020
455
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. Git can do weird things with identical files. I had four files with the exact same content in a code directory:
  2.  
  3. 20200519.sql
  4. 20200521.sql
  5. 20200526.sql
  6. 20200528.sql
  7.  
  8. I ran the following commands in order:
  9.  
  10. git rm 20200519.sql
  11. git mv 20200521.sql 20200521_updates.sql
  12. git mv 20200526.sql 20200526_updates.sql
  13. git mv 20200528.sql 20200528_updates.sql
  14.  
  15. Git says that it actually did the following:
  16.  
  17. Rename 20200519.sql -> 20200521_updates.sql
  18. Rename 20200521.sql -> 20200526_updates.sql
  19. Rename 20200526.sql -> 20200528_updates.sql
  20. Delete 20200528.sql
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement