0

can you please tell me how to add to .gitignore files with names that contain a part of the name.

My file 2021-11-08-11-29-42.060-VBoxSVC-8706.log

Example .gitignore

*VBox*.log
Alex A
  • 323
  • 1
  • 8
  • 2
    If the file(s) are already in the repository, you first have to delete them from the repository before you can ignore them. See [here](https://stackoverflow.com/a/48414480/650012) for example. – Anders Gustafsson Nov 16 '21 at 07:20
  • 1
    Is the file in a subdir? `*` won't match subdirs. Use `**/*VBox*.log` for that. – wjandrea Nov 16 '21 at 07:21
  • @AndersGustafsson Oh, thank you very much, the example from the link response works. – Alex A Nov 16 '21 at 07:29

0 Answers0