<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Firmware Version Control with GitHub part 1: Branch Strategy for New Features</title><link>/members-area/b/blog/posts/firmware-version-control-with-github-part-1-branch-strategy-for-new-features</link><description>A possible strategy for using GIT and working with branches. 
In this part 1: working on new developments. 
In part 2: bug fixes on the released code 



 



I am suggesting a GitHub process, but it translates to other platforms with pull ...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Firmware Version Control with GitHub part 1: Branch Strategy for New Features</title><link>https://community.element14.com/members-area/b/blog/posts/firmware-version-control-with-github-part-1-branch-strategy-for-new-features</link><pubDate>Wed, 12 Aug 2020 20:22:02 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:d701b936-8d2f-4f52-a5c8-1d45d60ace0b</guid><dc:creator>Workshopshed</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Having spent just over 2 months now using git flow (the branching model, not the software) pretty much daily at work. I can conclude that it mostly works. We commit and merge code daily and release multiple times per week to production. Not as fast as some places but it seems to be mostly working.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Git flow works really well when the changes made in the different features don&amp;#39;t affect the same parts of the code. One strategy for dealing with releasing several overlapping features at the same time is the release branch approach.&lt;/p&gt;&lt;p&gt;It works really well when you submit the features to dev and then to master quite frequently.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Things that will cause you grief:&lt;/p&gt;&lt;p&gt;If two of your colleagues both decide to do a big rewrite at the same time then you can have a nightmare merging them back together. For that case a strategy of restricting to one person doing radical changes or pair programming can work.&lt;/p&gt;&lt;p&gt;It does not work so well when you&amp;#39;ve got automated tools generating files that are source controlled. If possible, don&amp;#39;t include those files if possible let them get regenerated by your build pipeline.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If you&amp;#39;ve got a few people in your team and are working on multiple features, I can also recommend a branching visualiser tool, we use gitkraken but there are plenty of others about.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=9251&amp;AppID=75&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Firmware Version Control with GitHub part 1: Branch Strategy for New Features</title><link>https://community.element14.com/members-area/b/blog/posts/firmware-version-control-with-github-part-1-branch-strategy-for-new-features</link><pubDate>Wed, 12 Aug 2020 19:23:26 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:d701b936-8d2f-4f52-a5c8-1d45d60ace0b</guid><dc:creator>Andrew J</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Following on to wrap up (I started on the false assumption you were describing the use of gitflow without actually mentioning it!)&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;gitflow follows the same branching strategy as you describe here which isn&amp;#39;t surprising as it originates from the same place.&amp;nbsp; By default, it isn&amp;#39;t geared up to use Pull Requests as you do, and I think that could be a concern for many development cooperations.&amp;nbsp; Not so much for hobbyists who could keep things simple of course!&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Instead of Pull Requests, gitflow uses a concept of &amp;#39;Finish&amp;#39;, e.g. (once the release changes are committed):&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=text&amp;amp;text=git+flow+finish+release%2FRelease1.0.1]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This just wraps a number of git commands into one operation: e.g. for a release branch, merges it into &amp;#39;master&amp;#39; and &amp;#39;development&amp;#39; and deletes the branch.&amp;nbsp; All on local.&amp;nbsp; A push to remote is required to then sync these two branches.&amp;nbsp; All cooperating developers follow the same process and Pull Requests aren&amp;#39;t involved.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;It took a bit of searching to work out how to integrate gitflow and Pull Requests and it is possible.&amp;nbsp; Instead of running the git finish command: commit and push the changes when done, then raise the Pull Request as you describe and follow it through.&amp;nbsp; Finally, delete the branch on local manually - gitflow doesn&amp;#39;t actually care if &amp;#39;finish&amp;#39; is run or not.&amp;nbsp; It&amp;#39;s even possible to integrate the Pull Request / finish approaches, and desirable if one is settled on using gitflow, better described by this chap in his video - the actual description of this specific approach is close to the end:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;span id="6473b237_54f0_46ce_afb5_de0087f155ad"&gt;&lt;span&gt;[View:https://www.youtube.com/watch?v=ZEX67ogT658:740:466]&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;What&amp;#39;s described is a way of doing what you suggest as an approach but automating a lot of it with &amp;#39;standardised&amp;#39; functions.&amp;nbsp; If that makes sense: standardised in the sense that people seem to have settled on the gitflow implementation that can be downloaded.&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This has been an interesting few posts to follow and understand Jan, thanks for creating them.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=9251&amp;AppID=75&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Firmware Version Control with GitHub part 1: Branch Strategy for New Features</title><link>https://community.element14.com/members-area/b/blog/posts/firmware-version-control-with-github-part-1-branch-strategy-for-new-features</link><pubDate>Tue, 11 Aug 2020 17:29:10 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:d701b936-8d2f-4f52-a5c8-1d45d60ace0b</guid><dc:creator>Andrew J</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Hi Jan,&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I&amp;#39;m not that familiar with git although I have used it.&amp;nbsp; Rather than the command line I&amp;#39;m using GitKraken and what you are blogging here seems to match to gitflow which is directly integrated into GitKraken.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;(This isn&amp;#39;t a question about Gitkraken but git!) &lt;/p&gt;&lt;p&gt;When I activate that integration it ensures that I have two branches to start from: master and development on local.&amp;nbsp; This is where it would appear to differ from your manual approach - development is not a clone of master.&amp;nbsp; In trying this workflow out, I created a hot fix - which created a branch, hotfix, from master - and when I committed and &amp;#39;finished&amp;#39;, it merged hotfix into master and development, and deleted the hotfix branch, all on local repository. Pushing to remote I can see the commit and the version tag created (but not the development branch.)&amp;nbsp; Reading up about gitflow, it seems to me that development branch should be a clone of master as all &amp;#39;dev&amp;#39; work, apart from hot fixes, is originated from that branch.&amp;nbsp; Does that seem right to you?&amp;nbsp; If so, is there a way of getting development branch to match master - rebase master on development - or is that not necessary?&amp;nbsp; I would expect to push changes on development to remote but perhaps development always stays on local and never goes to remote.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Hopefully, I&amp;#39;ve asked this the right way, I&amp;#39;m still getting my head around the terminology and right way of working!!&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=9251&amp;AppID=75&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Firmware Version Control with GitHub part 1: Branch Strategy for New Features</title><link>https://community.element14.com/members-area/b/blog/posts/firmware-version-control-with-github-part-1-branch-strategy-for-new-features</link><pubDate>Sat, 09 May 2020 12:55:19 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:d701b936-8d2f-4f52-a5c8-1d45d60ace0b</guid><dc:creator>Workshopshed</dc:creator><slash:comments>2</slash:comments><description>&lt;p&gt;Interesting to see embedded development using these techniques. I saw a talk from Arm the other week about CI and automated testing which is something you can do once you start using tools like git. &lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=9251&amp;AppID=75&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Firmware Version Control with GitHub part 1: Branch Strategy for New Features</title><link>https://community.element14.com/members-area/b/blog/posts/firmware-version-control-with-github-part-1-branch-strategy-for-new-features</link><pubDate>Sat, 09 May 2020 08:19:46 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:d701b936-8d2f-4f52-a5c8-1d45d60ace0b</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;What I haven&amp;#39;t discussed here is that GitHub also has &amp;quot;SCRUM board&amp;quot; style project support:&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x161/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-d701b936-8d2f-4f52-a5c8-1d45d60ace0b/1104.contentimage_5F00_207784.png:620:161]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The task here is attached both to an &amp;quot;issue&amp;quot; that supports this work ....&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/620x499/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-d701b936-8d2f-4f52-a5c8-1d45d60ace0b/0508.contentimage_5F00_207785.png:620:499]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;... and the related pull request(s):&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/353x214/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-d701b936-8d2f-4f52-a5c8-1d45d60ace0b/3731.contentimage_5F00_207786.png:353:214]&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can either manually move the tasks through the phases by dragging it from one lane to the other, &lt;/p&gt;&lt;p&gt;or enable automation where a pull request can close the issue, and then the issue completes the task.&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=9251&amp;AppID=75&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item><item><title>RE: Firmware Version Control with GitHub part 1: Branch Strategy for New Features</title><link>https://community.element14.com/members-area/b/blog/posts/firmware-version-control-with-github-part-1-branch-strategy-for-new-features</link><pubDate>Fri, 08 May 2020 11:40:08 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:d701b936-8d2f-4f52-a5c8-1d45d60ace0b</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;For a full-fledged approach: &lt;a class="jive-link-external-small" href="https://nvie.com/posts/a-successful-git-branching-model/" rel="nofollow ugc noopener" target="_blank" title="https://nvie.com/posts/a-successful-git-branching-model/"&gt;https://nvie.com/posts/a-successful-git-branching-model/&lt;/a&gt; &lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=9251&amp;AppID=75&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>