I tried to create another branch from issue-430
This is a problem — you created a branch from issue-430
(say it's called newbranch
), which means that any commits made in issue-430
are already in new-branch
. When you branch off another branch, it's almost like creating a copy of where you branched from (not really because it's actually just creating another pointer to the same hash but for understanding sake we'll go with this). So you're trying to cherry pick commits from issue-430
onto new-branch
but they're already there because new-branch
is the same as issue-430
, so you can't commit anything because git says there's no changes to apply.
You probably also have modified changes that show up when running git status
, and those modified files, git is saying, will be overwritten if you try to apply the changes from the commit you're cherry-picking.
So instead, say you want to make a PR to master
from a specific commit from issue-430
. First, make sure you don't have any relevant uncommitted changes (you can git stash
to push them off for now)
Checkout master
first and branch off that, say we call it pr-branch
. Then, cherry-pick that one commit onto pr-branch
. Then, push pr-branch
to your upstream repo.