1

I have a C++ code and after executing it in codeblocks, it generate another two files(ugly.o, and ugly). The latter doesn't have an extension and it is executable. I can ignore it manually by typing in .gitignore as ugly. However it is not a dynamic way. I have to explicitly add another filename in .gitignore when I created a new one. Do you know other ways to make it dynamic, that will treat any file that does't have an extension will be ignored?

chwarr
  • 6,777
  • 1
  • 30
  • 57
Jofel Bayron
  • 149
  • 2
  • 5
  • Are you going to create and delete many projects in the repository, each with different names? Are you going to create a lot of executable files all the time? If not then I really don't see this as a problem. You have your workspace, you have a fixed set of projects in the workspace, and you only need to add the projects executable to the `.gitignore` file *once* and that's it. – Some programmer dude Dec 11 '15 at 09:21

1 Answers1

2

Two solutions, either put all these files into a separate folder e.g _notused/ and .gitignore the whole folder (this is what i do)

or add an extension to that file and ignore it explicitly in .gitignore

or just use the filename (even without extension and/or as a unique pattern, as similar answers have suggested) in .gitingore (havent tried that but it might work)

Nikos M.
  • 8,033
  • 4
  • 36
  • 43