Question: After mistakenly staging a file named myFile to the index, how would you remove it from the index to exclude it from your next commit?
- Use git reset HEAD^.
- Use git reset myFile.txt.
- Use git -rm myFile.txt.
- Use git reset.
Answer: The correct answer of the above question is Option B:Use git reset myFile.txt.