Search code examples
gitgithubgitlabbitbucketatlassian-sourcetree

How to Move commit(contains 2-3 files) from one branch to another branch using cherry-pick or any other method


I have two branches, in that one is master branch and another is development branch.

I have been trying to move commits from development to master using cherry-pick method. This method worked well for me if the commit has edited or updated in any one file. But in my scenario, The two to three files edited and pushed in single commit. I need to move those commit to my master branch.

So when I tried cherry-pick, I couldn't move it out. I was able to move only single-file edited in single commit and wasn't able to move multi-files edited in single commit. I am looking out here solution for the issue.


Solution

  • You can use git cherry-pick, you'll just have to resolve your merge conflicts. See How to resolve merge conflicts in Git