'Context menu for folder does not contain "Add to ignore list" tortoisegit

I use TortoiseGit 1.8.16. But the context menu for a folder does not contain the "Add to ignore list" option.

Right click on folder in repository. I expect to see "Add to ignore list" in context menu. This item is not in the context menu.

How to add file in ignore via TortoiseGit?



Solution 1:[1]

In TortoiseGit the context menu is configurable in two ways.

1) You can configure which entries to show directly on the context menu (and not in the TortoiseGit submenu). This can be configured in TortoiseGit settings -> Context menu.

2) You can hide entries by default, so that those are only visible if you hold the Shift-Key while opening the context menu. This can be configured in TortoiseGit settings -> Set Extended Context menu.

In your case, I suppose that the entry is hidden. Btw. the "Add to ignore list" is only available for unversioned folders (otherwise "Delete and ignore is available").

It is also possible to ignore items from the context menu of the commit dialog.

See the TortoiseGit manual.

Solution 2:[2]

For ignoring files, you Can do:

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

Solution 3:[3]

I can do it with these steps below!

  1. Delete the file you want to ignore first. You can undo it later to get it back from the recycle bin. Or you can move it to another folder temporarily.
  2. Do git commit until the commit window opens. Don't commit!
  3. You'll see the file you want to ignore is going to be committed. Right click on the file and you'd see the option "Add to ignore list".
  4. Click it! Choose what kind of ignore you exactly need, and done!

Add to ignore list button

Solution 4:[4]

I know this is really old but I recently had this issue and it was because the directory had been set up for git previously then removed by deleting the .git directory. When re-instating it as a Git Repo the old .gitignore file came back and the directories I was trying to ignore were already listed in it.

To test the theory I removed all entries from the old .gitignore file, saved and the "Add to ignore list" was back in the context menu

Solution 5:[5]

1- R.click on the required folder and select Settings:

enter image description here

2- At General>>Context Menu : Check "Add to ignore list", then click OK enter image description here

3- Icon will appear at the context menu: enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 MrTux
Solution 2 S M
Solution 3 Aminah Nuraini
Solution 4 user2169437
Solution 5 Mina Samir