Answer the question
In order to leave comments, you need to log in
How to reschedule a commit?
there are two branches master, dev. locally by mistake committed to master instead of dev. How can I transfer this commit from the master to dev. commit made locally and not pushed
Answer the question
In order to leave comments, you need to log in
Push commit to dev
git checkout dev
git cherry-pick <hash>
git checkout master
git reset --soft HEAD^
git checkout master
git rev-parse HEAD <- Ctrl+C
git checkout dev
git cherry-pick [Ctrl+V]
git checkout master
git reset HEAD~1 <- сбрасываем последний коммит
git checkout -- . <- сбрасываем состояние директории
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question