标记提交消息和变更集
我正在寻找一种解决方案,在提交消息中标记变更集。
对我来说,“标签”类似于:
- 代码清理
- 用户可见更改
- 修改数据库结构 (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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我喜欢使用以下标签:
此标签始终是提交消息中的第一件事,然后是简短描述和/或问题跟踪系统中的问题 ID(如果存在)。
我将这些标签与 svn 和 git 一起使用,到目前为止发现它们非常方便。
回答您的编辑:
这就是为什么我喜欢这些提交标签。如果提交改变了行为,它会立即可见。如果您的数据库方案定期更改,或者这些更改对您来说非常重要,您可以为此引入一个标签。
我还喜欢在适当的情况下将这些标签组合在一条提交消息中。例如,“测试 foo 的测试文档设置”。
通过数据库的附加 DB 标签,您可以轻松跟踪数据库相关的更改。
I like to use the following tags:
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.
大多数时候我使用 Typo3 的标签系统: http://wiki.typo3.org/ CommitMessage_Format_(Git)
它在提交消息中使用标签,如下所示:
[TAG] Short message
当然,我总是弹出问题编号以进行问题跟踪。我们使用的是 JIRA,所以它会变成这样:
[TAG] JIRA-123 Short message
Typo3 Tags:
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:
我更喜欢在问题跟踪器中为每个更改集分配一个问题。使用 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.