Skip to content

Instantly share code, notes, and snippets.

@nicerobot
Last active April 2, 2019 02:26
Show Gist options
  • Select an option

  • Save nicerobot/e0c754bfe50c33b70142b3d5f00ae2d5 to your computer and use it in GitHub Desktop.

Select an option

Save nicerobot/e0c754bfe50c33b70142b3d5f00ae2d5 to your computer and use it in GitHub Desktop.
JS Fiddle GitGraph for Hot-fix Production Release Process
<head>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/gitgraph.js/1.15.1/gitgraph.min.js"></script>
<body>
<canvas id="gitGraph"></canvas>
var gitgraph = new GitGraph( {
template: new GitGraph.Template( {
colors: [ "#87bdd8", "#a2836e", "#e06377", "#d9ad7c", "#fA8973" ],
branch: {
lineWidth: 3,
spacingX: 50,
showLabel: true,
},
commit: {
spacingY: -30,
dot: {
size: 10
},
message: {
displayAuthor: false,
displayBranch: false,
displayHash: false,
font: "normal 12pt Arial"
},
shouldDisplayTooltipsInCompactMode: false,
}
} ),
});
var develop = gitgraph.branch("develop");
develop.commit("Continue using develop as usual");
var master = gitgraph.branch("master");
master.commit({tag: "release/1.2.3", message: "Production: current tag"});
var b1 = master.branch("hotfix/1.2.3/JIRA-ID");
b1.commit("Bug fixed");
b1.commit("QA: approved");
b1.merge(develop);
b1.merge(master, {tag: "release/1.2.4"});
master.commit("Production: deployed (from 'master')");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment