How do you unstage a file in Git?

To unstage a file in Git, you can use the git reset command followed by the file name. Here’s the syntax:

git reset <file>

For example, if you want to unstage a file named message.txt, you would run:

git reset message.txt

This command will remove the file from the staging area but keep the changes in your working directory.

0 Comments

no data
Be the first to share your comment!