TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Very Easy Changelogs with Git

12 点作者 skiskilo超过 11 年前

4 条评论

dexen超过 11 年前
Worth mentioning is <i>&quot;--first-parent&quot;</i> argument to git-log, which is usefull when using git-merge --no-ff to keep clean history with summary commits.<p>With <i>&quot;--first-parent&quot;</i>, git-log only follows the left-hand (first) parent, thus listing the shortened history, by skipping over the right-hand ancestors of merge commits.
评论 #6587060 未加载
michaelmior超过 11 年前
Whether or not this makes sense depends on how you manage your commmits. For many projects, I think the changelog would produce too much noise. I would argue that your users care mostly about three things: what bugs were fixed, what new features are available, and any backwards incompatible changes. This can be hard to quickly glean from the commit history.<p>That said, if your history works with this model, then it&#x27;s a handy tip :)
pahans超过 11 年前
I recently started using git. thanks for the tip skiskilo
X4超过 11 年前
I&#x27;d say shamelessly copied from the much better article from here:<p><a href="http://git-scm.com/book/en/Git-Basics-Viewing-the-Commit-History" rel="nofollow">http:&#x2F;&#x2F;git-scm.com&#x2F;book&#x2F;en&#x2F;Git-Basics-Viewing-the-Commit-His...</a><p>I once needed a ChangeLog file, so I wrote this:<p># create ChangeLog file out of git history<p>alias g.changelog=&quot;git --no-pager log --format=\&quot;%ai %aN %n%n%x09* %s%d%n\&quot; | sed \&quot;s&#x2F;\<i>\ \</i>&#x2F;*&#x2F;g\&quot; &gt; ChangeLog&quot;<p>g.ch&lt;TAB&gt; completes it for me in zsh.