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

Get the fastest log management and analysis with Graylog open source or enterprise edition free up to 5GB per day

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)

Get the fastest log management and analysis with Graylog open source or enterprise edition free up to 5GB per day

Topics:

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

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

{{ parent.tldr }}

{{ parent.urlSource.name }}