Sometimes we need to switch one commit from one branch to another. Then we need to execute following commands step by step.
git checkout branch_2
git merge branch_1
git checkout branch_1
git reset --hard HEAD~1
git checkout branch_2
reference : stackoverflow
2 Comments
Many thanks for the exciting blog posting! I really appricateyou for this post. I actually added your blog to my favorites and will look forward for more updates. Great Job, Keep it up..
ReplyDeleterecent technology news
Thanks.
Delete