标记提交消息和变更集

发布于 2024-12-25 12:59:07 字数 519 浏览 2 评论 0原文

我正在寻找一种解决方案,在提交消息中标记变更集。

对我来说,“标签”类似于:

  • 代码清理
  • 用户可见更改
  • 修改数据库结构 (ALTER TABLE)
  • 文档更改

到目前为止我使用 SVN,但想切换到 git。如果有标准,很多工具如 trac、redmine...都可以使用它。

我希望它能回答这样的问题:

  • 如果我更新系统,客户可以看到哪些更改,或者 这只是维护更新吗?
  • 两个版本之间的数据库架构是否发生了变化?

背景:

到目前为止,我使用 unison 在 DEV、TEST 和 PROD 系统之间进行同步。但 unison 对版本管理(目前是 SVN)一无所知。我想切换到git。我想快速了解有哪些变化。

示例:我想查看 TEST 和 PROD 之间的变化。我不想看到源代码更改,而是看到提交消息。但有时提交数量最多可达 100 次。这里我想要一个过滤器,以排除不重要的更改。

I am searching for a solution, to tag changesets in commit messages.

For me a "tag" is something like:

  • code clean up
  • user visible change
  • modifies database structure (ALTER TABLE)
  • Documentation change

Up to now I use SVN, but want to switch to git. If there would be standard, a lot of tools like trac, redmine, ... could use this.

I want this to answer questions like this:

  • If I update a system, what changes are visible for the customer, or
    is it just a maintance update?
  • Has the database schema changed between two versions?

Background:

Up to now I use unison to sync between DEV, TEST and PROD system. But unison does not know anything about the version management (which is SVN at the momement). I want to switch to git. And I want to see fast, what are the changes.

Example: I want to see changes between TEST and PROD. I don't want to see the source code changes, but the commit messages. But sometimes there are up to 100 commits. Here I want a filter, to exclude unimportant changes.

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

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

发布评论

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

评论(3

我喜欢使用以下标签:

ADD adding new feature
FIX a bug
DOC documentation only
REF refactoring that doesn't include any changes in features 
FMT formatting only (spacing...)
MAK repository related changes (e.g., changes in the ignore list)
TEST related to test code only.

此标签始终是提交消息中的第一件事,然后是简短描述和/或问题跟踪系统中的问题 ID(如果存在)。

我将这些标签与 svn 和 git 一起使用,到目前为止发现它们非常方便。

回答您的编辑:
这就是为什么我喜欢这些提交标签。如果提交改变了行为,它会立即可见。如果您的数据库方案定期更改,或者这些更改对您来说非常重要,您可以为此引入一个标签。

我还喜欢在适当的情况下将这些标签组合在一条提交消息中。例如,“测试 foo 的测试文档设置”。

通过数据库的附加 DB 标签,您可以轻松跟踪数据库相关的更改。

I like to use the following tags:

ADD adding new feature
FIX a bug
DOC documentation only
REF refactoring that doesn't include any changes in features 
FMT formatting only (spacing...)
MAK repository related changes (e.g., changes in the ignore list)
TEST related to test code only.

This tag is always the first thing in the commit message and then followed by a brief description and/or the issue-id from the issue tracking system, if it exists.

I use those tags with svn and git and so far found them very convenient.

To answer your edit:
This is why I like those commit tags. It's immediately visible if the commit changes the behavior or not. If your database scheme changes regularly or if these changes or very important for you, you could introduce a tag for that.

I also like to combine those tags in one commit message where appropriate. E.g., "TEST DOC setup of test foo".

With an additional DB tag for database, you could easily keep track of database related changes.

如梦初醒的夏天 2025-01-01 12:59:07

大多数时候我使用 Typo3 的标签系统: http://wiki.typo3.org/ CommitMessage_Format_(Git)

它在提交消息中使用标签,如下所示:[TAG] Short message
当然,我总是弹出问题编号以进行问题跟踪。我们使用的是 JIRA,所以它会变成这样:[TAG] JIRA-123 Short message

Typo3 Tags:

可能的标签是:

  • [功能]:一项新功能(也是小的补充)。它很可能是一个附加功能,但也可能被删除。这只能发生在 v4 的“master”分支中,因为旧分支中不允许有新功能。例外情况必须与相应的发布经理根据具体情况进行讨论。
  • [BUGFIX]:修复了一个错误。
  • [任务]:上述类别未涵盖的任何内容,例如编码风格清理。
  • [API]:API 已更改,方法或类已添加或删除;方法签名或返回类型已更改。这仅指TYPO3的公共API。

此外,在某些情况下可能会添加其他标志:

  • [!!!]:重大改变。在此补丁之后,某些内容的工作方式与以前不同,用户/管理员/扩展开发人员将必须进行一些更改。应该只发生在“master”上。
  • [WIP]:工作正在进行中。一旦更改的最终版本可用,此标志将被删除。标记为 WIP 的更改永远不会合并。
  • [安全]:可视化更改修复了安全问题。此标签由安全团队使用,如果您发现安全问题,请务必先与安全团队联系!

主题描述示例:

  • [BUGFIX] 在 tslib_fe 中抛出 HttpStatusExceptions
  • [BUGFIX][SECURITY] 准备好的语句中存在 SQL 注入漏洞
  • [FEATURE][CONF] 添加在列表模块中隐藏 BE 搜索框的选项
  • [!!!][功能] 将高级前端编辑移至 TER
  • [!!!][任务] 删除 t3lib_sqlengine
  • [!!!][API] 从 t3lib_userAuth 中删除已弃用的方法 redirect()
  • [API] 为 HTTP 状态异常创建异常层次结构

Most of the time I'm using the tag system from Typo3: http://wiki.typo3.org/CommitMessage_Format_(Git)

It uses tags in commit messages like this: [TAG] Short message
Of course I always pop in an issue number for issue tracking. We're using JIRA so it will become something like this: [TAG] JIRA-123 Short message

Typo3 tags:

Possible tags are:

  • [FEATURE]: A new feature (also small additions). Most likely it will be an added feature, but it could also be removed. This can only happen in v4's "master" branch, because no new features are allowed in older branches. Exceptions to this have to be discussed on a case-to-case basis with the corresponding release managers.
  • [BUGFIX]: A fix for a bug.
  • [TASK]: Anything not covered by the above categories, e.g. coding style cleanup.
  • [API]: An API has changed, methods or classes have been added or removed; method signatures or return types have changed. This only refers to the public API of TYPO3.

Additionally other flags might be added under certain circumstances:

  • [!!!]: Breaking change. After this patch, something works differently than before and the user / admin / extension developer will have to change something. Should only happen on "master".
  • [WIP]: Work In Progress. This flag will be removed, once the final version of a change is available. Changes marked WIP are never merged.
  • [SECURITY]: Visualizes that a change fixes a security issue. This tag is used by the Security Team, in case you found a security issues please always follow get in contact with the Security Team first!

Example topic descriptions:

  • [BUGFIX] Throw HttpStatusExceptions in tslib_fe
  • [BUGFIX][SECURITY] SQL Injection vulnerability in prepared statements
  • [FEATURE][CONF] Add option to hide BE search box in list mod
  • [!!!][FEATURE] Move Advanced Frontend Editing to TER
  • [!!!][TASK] Remove t3lib_sqlengine
  • [!!!][API] Remove deprecated method redirect() from t3lib_userAuth
  • [API] Create an Exception hierarchy for HTTP Status Exceptions
等待我真够勒 2025-01-01 12:59:07

我更喜欢在问题跟踪器中为每个更改集分配一个问题。使用 jira 等已知问题跟踪器,可以选择在更改集中解决的问题。选择问题后,问题描述会自动放置在变更集的消息中。将来可以对其进行跟进,也可以在您的问题跟踪器中进行报告。

I prefer to assign each change set with an issue in my issue tracker. Using known issue trackers like jira, it is possible to select the issue that is resolved in a change set. After selecting an issue, the issue description is automatically placed in the message of the change set. They can be followed up in future and also be reported in your issue tracker.

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