Moving Git Commits to Another Branch

git checkout CorrectBranch
git merge WrongBranch
git checkout WrongBranch
git reset --hard HEAD~3
git checkout WrongBranch
git reset --keep HEAD~3

--

--

--

Senior Integrations Officer at Doncaster Council Any views expressed are entirely my own.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to Build a QR Code Scanner for Windows and Android with Qt QML

Why is pyodbc trying to convert something from varchar to numeric?! When I

Why is Accounts Payable Workflow Automation a must?

KoalaDefi x Im Community AMA Recap

Stop Transforming in the name of Agile

Dart Programming

Modeling Problems as Graphs

How to create your own root ca to sign self signed certificates?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Steve Ellwood

Steve Ellwood

Senior Integrations Officer at Doncaster Council Any views expressed are entirely my own.

More from Medium

Importance of Git

Using benchmarkdotnet as a tool to write more efficient code

Fix: VS Code keeps asking git credentials on Windows