MikiBelavista MikiBelavista - 2 months ago 8
Git Question

How to add changes to commit?

I have deleted 4 huge files from my directory and with

git commit -m "added b"
tried to modify my original commit.
But

On branch master
changes not staged for commit:


How to perform changes?

Answer

Presumably you only removed the files from your sandbox. You need to remove them from the index before committing:

git rm hugefile.1 hugefile.2 hugefile.3 hugefile.4
git commit -m "removed four huge files"