我应该在 QT 项目中使用什么 .gitignore? (QT创建者)

发布于 2024-09-01 09:09:35 字数 792 浏览 8 评论 0原文

因此,经过一番思考,我写下了以下内容:

# 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

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

偷得浮生 2024-09-08 09:09:35

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

您可以在其中找到 .gitignore 文件多种编程语言、操作系统等等。

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.

葬心 2024-09-08 09:09:35

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

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

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.

暗喜 2024-09-08 09:09:35

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

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.

仙女 2024-09-08 09:09:35

从 Qt 4.6 开始,我已将 *.log 添加到我的 svn:ignore 中,因为当我运行使用 QtTest 库构建的测试时,它们会生成此类文件。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文