git count-objects -vH
Produces something similar to:
count: 2717
size: 1.00 MiB
in-pack: 9740
packs: 1
size-pack: 7.98 GiB
prune-packable: 0
garbage: 0
size-garbage: 0 bytes
-
Commit changes before proceeding, including the
.gitinore
file -
If you only want to remove a few files, you can use the following command and it will only remove the file from Git's index, and keep it on your filesystem.
git rm --cached someFile.ext
- If you have a ton of files to remove (e.g., an entire directory, etc.), you can remove everything from the repo, but only from Git's index, not the actual file:
git rm -r --cached .
- If you removed everything in Step 3, then you'll want to re-add everyting
git add .
- Commit & Push Your Changes
git commit -m 'remove ignored files from repo'