有哪些使用 Git 管理变更日志的好方法? [英] What are some good ways to manage a changelog using Git?

查看:31
本文介绍了有哪些使用 Git 管理变更日志的好方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 Git 有一段时间了,最​​近我开始使用它来标记我的发布,以便我可以更轻松地跟踪更改并能够查看我们每个客户正在运行的版本(不幸的是代码目前要求每个客户端都有自己的 PHP 站点副本;我正在更改这一点,但进展缓慢).

I've been using Git for a while now, and I recently started using it to tag my releases so that I could more easily keep track of changes and be able to see which version each of our clients is running (unfortunately the code currently mandates that each client have their own copy of the PHP site; I'm changing this, but it's slow-going).

无论如何,我们开始建立一些势头,我认为能够向人们展示自上次发布以来发生的变化会非常好.问题是,我没有维护变更日志,因为我不知道如何去做.在这个特殊的时间里,我可以浏览日志并手动创建一个,但这会很快变得很累.

In any case, we're starting to build some momentum, and I thought it would be really good to be able to show people what has changed since the last release. The problem is, I haven't been maintaining a changelog, because I don't have a good idea of how to go about it. For this particular time, I can run through the log and manually create one, but that will get tiring very quickly.

我尝试使用谷歌搜索git changelog";和git manage changelog",但我没有找到任何真正谈论代码更改的工作流程以及它与更改日志如何一致的内容.我们目前正在关注 Rein Henrichs 的开发工作流程,我会喜欢与之相伴的东西.

I tried googling "git changelog" and "git manage changelog", but I didn't find anything that really talked about the workflow of code changes and how that coincides with the changelog. We're currently following Rein Henrichs' development workflow and I would love something that went along with that.

是否有我缺少的标准方法,或者这是每个人都做自己的事情的领域?

Is there a standard approach that I am missing, or is this an area where everybody does their own thing?

推荐答案

这是在 2015 年,但为了未来的搜索者,现在可以使用以下方法生成华丽的日志:

This was in 2015, but for the sake of future searchers, it's now possible to generate gorgeous logs with:

git log --oneline --decorate

或者,如果您希望它更漂亮(带有终端颜色):

Or, if you want it even prettier (with color for the terminal):

git log --oneline --decorate --color

将输出传送到 ChangeLog 是我目前在所有项目中使用的方法,这简直太棒了.

Piping that output to ChangeLog is what I currently use in all my projects, and it's simply amazing.

这篇关于有哪些使用 Git 管理变更日志的好方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆