You committed files to the wrong branch (master), and now you want to apply your changes to the right one (development)

I wanted to share a scenario and solution for a problem I am seeing arise in the dbatools project: Commits are registered against the “wrong” branch A pull request is submitted The file comparison shows hundreds of changes instead of 1-2 There are many ways this can happen, but usually due to forgetting to create […]