开发者

What .gitignore I should use with QT projects? (QT Creator)

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 (u开发者_StackOverflowsually 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?


You might be interested in this little project: https://github.com/github/gitignore

There you can find .gitignore files for several programming languages, OSs and even more.


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜