Useful Git Merging Workflow

This is a useful git workflow for merging development work into the master branch in git that has made for nice clean merges. Special thanks to my Coworker Jeremy for sharing this.

This assumes you’ve cloned to branch “master”, and are working in local branch “dev”. As a best practice, you never really want to work in master, it should always be a clean copy of the remote origin.

From the top, on “master”:

From his original email on this subject: “The other nice thing about this method is that you can have as many “dev” branches as you want and they wont conflict with each other as long as you only ever track to and from master. You can also make child branches from “dev” following the same rebase->merge pattern without any problems.”