Git · Junior · Question 3 of 75
What does git add file.js do?
- ✓Correct answer: Stages the file's current content for the next commit
- 2Uploads the file to the remote repository
- 3Creates a new commit containing only that file
Explanation
git add copies the file's current state into the index. If you edit the file again after that, the new changes aren't staged until you run git add again.