hieuhtr / Blog

Don’t be lazy. Don’t make excuses. No one cares. Work fucking harder.
Other
6 stars 2 forks source link

Remove files from git after editing .gitignore #61

Open hieuhtr opened 7 years ago

hieuhtr commented 7 years ago

Problem:

Have some files in repo that should be ignored, I added them to the .gitignore but, of course, they are not removed from my repository.

Solution:

Run git remove after editing .gitignore

$ git rm --help
$ git rm ./path/to/file