当我查看大多数网站时,人们以图片的方式展示他们的 git 工作流程。我想知道哪个工具用于相同的?
例如https://wiki.phpbb.com/images/c/c8/Phpbb-git-workflow-small.png
和http://nvie.com/posts/a-successful-git-branching-model/
我正在为企业实现 git,并希望显示类似的图表表示(如示例所示),所以我想知道是否有工具可以帮助我构建它
当我查看大多数网站时,人们以图片的方式展示他们的 git 工作流程。我想知道哪个工具用于相同的?
例如https://wiki.phpbb.com/images/c/c8/Phpbb-git-workflow-small.png
和http://nvie.com/posts/a-successful-git-branching-model/
我正在为企业实现 git,并希望显示类似的图表表示(如示例所示),所以我想知道是否有工具可以帮助我构建它
我向 Vincent Driessen 询问了他在博客文章http://nvie.com/posts/a-successful-git-branching-model/中使用的图表创建程序,他提到他使用了Apple Keynote。
就个人而言,我正在使用draw.io来创建图表,到目前为止我很喜欢它。到目前为止它是免费的,而且使用起来非常简单。
如果您的问题是关于创建特定于您的 git 存储库历史的图表,那么我建议使用GitFlowChart。文森特在这里有一个显示 GitFlowChart 的示例。
我正在为我的团队整理一份 git 工作流程手册,并发现了GitGraph.js,它是开源的,对我有用。
您可以使用这个gitgraphjs是一个 java 脚本库,它使您能够为 git repos 或 git 概念创建可视化。
http://gitgraphjs.com/是一个选项:
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.15.1/gitgraph.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.15.1/gitgraph.min.js" />
</head>
<body>
<canvas id="gitGraph"></canvas>
<script>
var gitgraph = new GitGraph({
template: "metro",
orientation: "horizontal",
mode: "compact"
});
var master = gitgraph.branch("master");
gitgraph.commit().commit().commit(); // 3 commits upon HEAD
var develop = gitgraph.branch("develop"); // New branch from HEAD
var myfeature = develop.branch("myfeature"); // New branch from develop
// Well, if you need to go deeper…
var hotfix = gitgraph.branch({
parentBranch: develop,
name: "hotfix",
column: 2 // which column index it should be displayed in
});
master.commit("This commit is mine"); // Add a commit on master branch
develop.commit({
dotColor: "white",
dotSize: 10,
dotStrokeWidth: 10,
sha1: "666",
message: "Pimp dat commit",
author: "Jacky <prince@dutunning.com>",
tag: "a-super-tag",
onClick: function(commit) {
console.log("Oh, you clicked my commit?!", commit);
}
});
</script>
</body>
由这个小提琴演示 - https://jsfiddle.net/h5mrLesu/