node_modules folder in the root project directory can be very large and slow down commit.
This command will overwrite history.

$git filter-branch -f --tree-filter 'rm -rf node_modules' HEAD 
$git gc --prune
$git push origin master --force

Related
Permanently remove files and folders from Git repo