For adding any files for the commit we add them using git add .
for adding all modified files or git add ${fileName}
for adding one file at a time.
In some situations, you might want to undo this git add command. You can use the following command to do so
git reset
This command can be used to unstage all files that were staged for the commit.
Whereas if you want to unstage only one particular file you can use the following command
git restore --staged ${fileName}
Top comments (0)