Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git - move commit from 1 branch to another [duplicate]

Tags:

git

I have two branches:

develop
myFeature

I have made a single commit incorrectly while on develop and should have been on myFeature.

The commit has not been pushed yet.

How can i move this commit from develop and onto myFeature?

like image 701
Marty Wallace Avatar asked Dec 20 '22 00:12

Marty Wallace


1 Answers

git checkout myFeature
git cherry-pick develop
git checkout -B develop develop~
like image 117
jthill Avatar answered Jan 13 '23 03:01

jthill