简体   繁体   中英

copy a hotfix from master to branch on sourcetree

I have made a quick-fix on master. I'd like to copy that small fix to some other branches. I tried to push it to another branch by selecting the master>selecting the commit>push>check some branch>ok. but when I click over to the branch there are no changes to be pulled.

After digging around I see this would have been easily accomplished with git-flow but now is too late and would require a whole other thread to figure out how to set up git-flow because my branch structure is different.

What is the simplest way now to push the change I made to another branch?

I guess i can always just physically copy\\paste the changes but what is the correct way?

Thanks!

If you can't merge, I would recommend cherry-pick. Here's how to do it in SourceTree:

https://answers.atlassian.com/questions/308089/how-to-use-cherry-pick-in-sourcetree

And here's an explanation of cherry-pick:

http://think-like-a-git.net/sections/rebase-from-the-ground-up/cherry-picking-explained.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM