The other day I was trying to describe some branching and merging strategies over distributed repositories to a remote coworker. Sadly I’m fairly new to complex git branching behaviour, so I had a hard time describing what I was trying to say.
Luckily I stumbled across Git Graph JS. It’s a really simple library for showing git concepts. Without further ado - let’s see some code. First we setup some objects…
Now let’s visualise the first commit in the master branch
Now I wanted to describe our UAT area should be branched from master…
Now features should be worked on in their separate feature branches that are taken off UAT. This allows us to keep the UAT area clean from volatility while the sprints are underway.
Eventually we have to get the branch back into UAT. When we are there we notice a bug, and make a fix. Notice you “Push” merges from the feature into the UAT branch.
Finally commit to master
Git Graph JS is a really good library and super simple to use. If you want to visualise git commits, then this is worth a look.