Git · Junior · Question 62 of 75
What does git mv old.js new.js do?
- 1Moves the file to another branch
- 2Copies the file and keeps both versions
- ✓Correct answer: Renames the file and stages the rename
Explanation
Git doesn't store renames explicitly; it detects them by comparing content. git mv is a shortcut for renaming plus git rm and git add.