I want to make a single commit on different branches at the same time, since, in my project, I have different branches for different clients.
Say, I have made a new feature commit on Branch A. Can I also make this commit on Branch B, Branch C and D at the same time as well? Is there any short cut command for this? This is very troublesome to checkout one branch, and cherrypick the commit everytime, sometime, if the commit is necessary on many branches, it would be a nightmare for me.
Any simple bash script for this operation?
There is a similar question in there. But rebasing is not that I want.
The cherry-pick feature will do the job and will only apply the last commit:
Considering branches A, B
git checkout A
git commit -m "Fixed the bug x"
git checkout B
git cherry-pick A
hope this helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With