什么.gitignore我应该用于QT项目?(QT Creator)

Env*_*vek 25 git qt gitignore qt-creator

所以,经过一番思考后,我写了以下内容:

# 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 
*~

请问,需要添加或修复的内容(特别是对于Windows - 我现在还没有一个在手.而Mac也是[根本没有工作]).

我想保持我的存储库清晰:-)

UPD:我应该包括MakefileMakefile.*它吗?*.pro.user

iam*_*ony 33

您可能对这个小项目感兴趣:https://github.com/github/gitignore

在那里,您可以找到几种编程语言,操作系统甚至更多的.gitignore文件.


小智 7

.pro.user文件应该进入.gitignore.它并不意味着在开发人员和/或平台之间共享.

我将进一步添加由构建步骤生成的任何文件:这当然包括Makefile.


Mic*_*yan 1

您可能想要添加的一些其他内容是“.DS_Store”(由 Mac OS X 中的 Finder 创建 - 它的作用与 Windows 上的“Thumbs.db”几乎相同)和“*.bak”(常见扩展名)用于临时备份文件,主要在 Linux 上的编辑器中找到)。您可能还对有关 cvsignore 的这篇文章感兴趣,其中提供了相当大的要忽略的常见文件模式列表。