Assuming that you’ve staged/indexed some files and folders with git add and want to revert it without loosing your work. Let’s revert it with git reset command. For more information, click  git add and  git reset links.

Check the current status

inanzzz@inanzzz:~/project$ git status
On branch develop
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

	deleted:    src/AppBundle/AppBundle.php

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   app/config/routing.yml

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	src/Sport/

#git

Revert Git Add Command with Git Reset to Unstage Or Unindex Files and Folders
1.50 GEEK