Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Polishing Your Feature Branch Commits

DZone's Guide to

Polishing Your Feature Branch Commits

· DevOps Zone
Free Resource

The Nexus Suite is uniquely architected for a DevOps native world and creates value early in the development pipeline, provides precise contextual controls at every phase, and accelerates DevOps innovation with automation you can trust. Read how in this ebook.

When you create your own, personal feature branch you're allowed to do as much commits as you want, even allowing kinda dirty commit messages. This is a really powerful approach as you can jump back to any point in your dev cycle. However, once you're ready to merge back to master you should polish your commit history by doing a rebase. This is done usinggit rebase -i HEAD~<num-commits>

The following animated GIF shows how do do it:

Demo on cleaning up your commit history (enlarge)

The DevOps Zone is brought to you in partnership with Sonatype Nexus.  See how the Nexus platform infuses precise open source component intelligence into the DevOps pipeline early, everywhere, and at scale. Read how in this ebook

Topics:

Published at DZone with permission of Juri Strumpflohner. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}