views:

155

answers:

3

So, after little thinking I have wrote the following:

# In repository we don't need to have:
# Compiled object files
*.o

# Generated MOC, resource and UI files
moc_*.cpp
qrc_*.cpp
ui_*.h

# Debug and Release directories (created under Windows, not Linux)
Debug/
Release/

# .log files (usually created by QtTest - thanks to VestniK)
*.log

# Built windows .exe and linux binaries
# NOTE: PROJECT is a your project's name, analog of PROJECT.exe in Linux
*.exe
*.dll
PROJECT

# Windows-specific files
Thumbs.db
desktop.ini
# Mac-specific things (thanks to Michael Aaron Safyan)
.DS_Store

# Editors temporary files 
*~

Please ask, what needs to be added or fixed (especially for Windows - I haven't one under hand now. And Mac too [haven't work in it at all]).

I want to keep my repository clear :-)

UPD: Should I include Makefile and Makefile.* in it? *.pro.user?

+1  A: 

Some additional things you might want to throw in are ".DS_Store" (created by Finder in Mac OS X -- it does pretty much the same thing as "Thumbs.db" on Windows) and "*.bak" (a common extension for temporary backup files, predominantly found among editors on Linux). You may also be interested in this article on cvs ignore which provides a fairly large list of common file patterns to ignore.

Michael Aaron Safyan
A: 

Starting from Qt 4.6 I have added *.log to my svn:ignore since when I'm running tests which are built with QtTest library they produce such files.

VestniK
+1  A: 

The .pro.user file should go into .gitignore. It is not meant to be shared between developers and/or platforms.

I would further add any file that is generated by the build step: This does of course include the Makefiles.

Tobias Hunger