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

查看:47
本文介绍了使用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天全站免登陆