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.
Loading...
Related Quiz
- The command git _______ is used to create a new branch and switch to it in one step.
- To fix broken references in Git, the _______ command can be used to recover lost commits and branches.
- What is the primary role of Git in build automation?
- Your project has a dependency on a large external library. What Git feature would be most efficient to manage this dependency?
- The ________ branch in Gitflow is used for integrating features before a release.