Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TortoiseGit: add to ignore already commited gen and bin folder

How to add to ignore list already commited gen and bin folder using TortoiseGit?

like image 665
pvllnspk Avatar asked Dec 04 '22 01:12

pvllnspk


2 Answers

For untracking + ignoring files, you do:

$ git rm -r --cached gen/ bin/
$ echo "gen/" >> .gitignore
$ echo "bin/" >> .gitignore

git rm --cached removes the file from the index, without changing the file in the working copy. So now git doesn't track it, but you still have it in your local folder.

like image 133
mgarciaisaia Avatar answered Dec 11 '22 17:12

mgarciaisaia


resolved myself:

  1. add folders to .gitignore

  2. delete these folders

  3. commit , push

and it works.

like image 38
pvllnspk Avatar answered Dec 11 '22 15:12

pvllnspk