What should be in .gitignore?
-
@idlefrog
:) For reference, I paste my own.gitignore
(Linux development) below. It's somewhat larger than yours ;-) Taken from a template somewhere. Only the last segment, underAtH
[I should probably have addedrelease/
too, but I only build for debug], is added by me for my project. As you please.# C++ objects and libs *.slo *.lo *.o *.a *.la *.lai *.so *.so.* *.dll *.dylib # Qt-es object_script.*.Release object_script.*.Debug *_plugin_import.cpp /.qmake.cache /.qmake.stash *.pro.user *.pro.user.* *.qbs.user *.qbs.user.* *.moc moc_*.cpp moc_*.h qrc_*.cpp ui_*.h *.qmlc *.jsc Makefile* *build-* *.qm *.prl # Qt unit tests target_wrapper.* # QtCreator *.autosave # QtCreator Qml *.qmlproject.user *.qmlproject.user.* # QtCreator CMake CMakeLists.txt.user* # QtCreator 4.8< compilation database compile_commands.json # QtCreator local machine specific files for imported projects *creator.user* # AtH stuff *.swp debug/ saves/
-
@idlefrog said in What should be in .gitignore?:
Is there an official template for .gitignore
I don't think so. What you should put there depends on your project and needs.
-
@idlefrog
:) For reference, I paste my own.gitignore
(Linux development) below. It's somewhat larger than yours ;-) Taken from a template somewhere. Only the last segment, underAtH
[I should probably have addedrelease/
too, but I only build for debug], is added by me for my project. As you please.# C++ objects and libs *.slo *.lo *.o *.a *.la *.lai *.so *.so.* *.dll *.dylib # Qt-es object_script.*.Release object_script.*.Debug *_plugin_import.cpp /.qmake.cache /.qmake.stash *.pro.user *.pro.user.* *.qbs.user *.qbs.user.* *.moc moc_*.cpp moc_*.h qrc_*.cpp ui_*.h *.qmlc *.jsc Makefile* *build-* *.qm *.prl # Qt unit tests target_wrapper.* # QtCreator *.autosave # QtCreator Qml *.qmlproject.user *.qmlproject.user.* # QtCreator CMake CMakeLists.txt.user* # QtCreator 4.8< compilation database compile_commands.json # QtCreator local machine specific files for imported projects *creator.user* # AtH stuff *.swp debug/ saves/
-
Thanks @JonB, that's much longer & comprehensive compared to my one-liner!
Very helpful!
That' should keep me out of trouble for a good while :)@idlefrog
As I said, it will have been picked up from some template on the web when I started out. It is doubtless much larger than strictly necessary, like covering tests and QML which I do not even use, and some Qt4 stuff. But it will give you an idea of what might be produced which can be ignored. -
@idlefrog
As I said, it will have been picked up from some template on the web when I started out. It is doubtless much larger than strictly necessary, like covering tests and QML which I do not even use, and some Qt4 stuff. But it will give you an idea of what might be produced which can be ignored.