Given one or more existing commits, apply the change each one introduces, recording a new commit for each. The command git push -f will then force the reversion in your remote repository history, if you had already pushed the commit.Īs per the git documentation for git cherry-pick:.Use git reset HEAD~1 to reset back before your wrong-branch commit.Switch back to your original branch using git checkout again.Type git cherry-pick, substituting the SHA from above.Use git checkout to checkout the branch you want to move the commit to.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |