How to display branch label on all commits?
See original GitHub issueI have this:
<div id="gitgraph"></div>
const graphOptions ={
orientation:'vertical-reverse'
}
const graphContainer = document.getElementById("gitgraph");
const gitgraph = GitgraphJS.createGitgraph(graphContainer,graphOptions);
const master = gitgraph.branch("master");
master.commit("Initial commit");
const develop = gitgraph.branch("develop");
develop.commit("Add TypeScript");
const aFeature = gitgraph.branch("a-feature");
aFeature
.commit("Make it work")
.commit("Make it right")
.commit("Make it fast");
develop.merge(aFeature);
develop.commit("Prepare v1");
master.merge(develop).tag("v1.0.0");
As you can see branch labels not appearing on all commits, but I want the branch labels on all commits. How to achieve that? Here is the fiddle
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How can I show the name of branches on every commit in `git ...
1 Answer 1 · 3. I use something similar, but "%d" only gives labels the tip of each branch. · The one I...
Read more >git-show-branch Documentation - Git
Shows the commit ancestry graph starting from the commits named with <rev>s or <glob>s (or all refs under refs/heads and/or refs/tags) semi-visually.
Read more >git continued: Branching and tags - GitHub Pages
Git uses pointers, which are labels for particular commits in the history. ... To see all existing branches, as well as which one...
Read more >Git Cheat Sheet - GitLab
An overview with reference labels and history graph. One commit per line. $ git log ref.. List commits that are present on the...
Read more >Log tab | PhpStorm Documentation - JetBrains
tip · The Branches pane is located on the left and shows all local and remote branches. · The Commits pane is located...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@IsaacHub I’ve got great news: we added an option to do this in version v1.3.0 of
@gitgraph/js
and v1.4.0 of@gitgraph/react
packages.You can use the following option when you create the graph to activate:
https://github.com/nicoespeon/gitgraph.js/blob/4f85de4702881326520a1efcd11a221835eb9031/packages/stories/src/gitgraph-react/1-basic-usage.stories.tsx#L215
Thanks for your suggestion 👍
Yes. We prefer having the branch name on every commit. Because WE NEED IT. You should consider adding a new option to the library in the next patch release or minor release so that we can write something like
By default your library can ship with
branchNameOnEveryCommit
set tofalse
. Let the user decide the display of branch names while initiating the graph. As simple as that. Make sense?More configurable usability of a library is the real success.