Review Feature Branch Specific Changes Before Push To Master

I'm using git basic branch/merge to make feature changes. Typically during development there are several local commits. Some features take a fair amount of time complete so I periodically merge the master branch onto the feature branch so the feature branch stays somewhat in sync with master.

Once the feature is fully tested and ready to commit to master, I'd like to be able to review the changes specific to the feature branch that are not changes caused by periodically merging master.

Is there an easy way to see/review all feature branch specific changes before push to master (that aren't changes caused by periodically merging master)?

1 answer

  • answered 2021-05-03 20:04 Leonardo Dagnino

    Considering you're already up-to-date with master, since you already did merges for that, you can use git diff to show all modifications that branch makes:

    git diff master..<your branch>