// after adding a file mistakenly to commit
// git log to see how many times you have committed the changes so as to know how many times
// you would reset the commit
git log
// after getting how many times you would reset for example 5 times, then run below code 5 times
git reset HEAD~1
// then proceed to add again
git add .