To remove a file from the staging area without deleting the file itself, use the command git _______.

  • reset
  • unstage
  • rm
  • discard
The correct option is unstage. This command is used to remove a file from the staging area, leaving the working directory unchanged. It allows you to unstage changes that you previously staged with git add.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *