I have a set of unpushed commits in a local branch... and want to move them into another local branch created out of a new fresh clone. Is that possible?
CodePudding user response:
You need to set the first project as remote branche of the second then get your commits references by using git log and cherry pick merge them to the new branch
cd /home/projectB
git remote add projectA /home/you/projectA
git fetch projectA
git cherry-pick <first_commit>..<last_commit>
git remote remove projectA