To remove a file from staging after it has been added, use git ______.
- reset
- remove
- unstage
- delete
The correct option is "unstage." When you want to remove a file from the staging area in Git without deleting it, you can use the command git reset. Specifically, git reset unstages the specified file, making it untracked again.
Loading...
Related Quiz
- For distributed teams, setting up git _______ is essential for automating code review and integration processes.
- What is the primary role of Git in build automation?
- To maintain a clean Git history when transitioning, it's recommended to use git ________ for combining multiple commits.
- GitHub's security feature that protects against unauthorized changes to a repository is called __________.
- In migrating a large codebase to Git, what factors influence the choice of using a monorepo versus multiple smaller repositories?