0 votes
in Git by
How can I copy a commit in one branch to another?

1 Answer

0 votes
by

The ‘cherry-pick’ command is the best option in this case. It helps in finding the feasibility of reverting back an existing commit to the existing branch or location. Therefore, you have to switch to the target branch and then call the command “git cherry-pick {hash of that commit}”. As a result, you can find a new commit with a new hash because of the application of changes to a different destination.

...