Imagine I have 2 branches( Feature and Master). If I merge code to Feature branch, is there a way to automatically update those changes in master branch. I know we have cherry picking to do manual updates but I wanted to know if we have a way to automate this process. Please let me know your suggestions. Thanks in advance!
Asked
Active
Viewed 957 times
-1
-
1if you merge changes into the Feature branch, you already have them in the master. right? – Serge Apr 02 '19 at 02:21
2 Answers
1
Auto-merging into master sounds like a disastrous idea, but you can do this with hooks...

alwayslearning
- 268
- 2
- 9
1
You are almost killing the idea of having two branches. However, you can cherry-pick the commit to both the branches(as you already know about it).
If the changes are to be present in both branches(Feature and Master), what would be the idea of having two branches instead of one? Maybe you can push all your changes to Feature branch, and merge it to master periodically/after testing (That's how most organizations already work, Once the feature branch is tested and verified).

Mohamed Anees A
- 4,119
- 1
- 22
- 35
-
Code that is checked in to feature has to be in Master and the one in master need not to be in feature. I wanted to know if there is a way to automate this process of cherry picking – shri Bin Apr 02 '19 at 13:37
-
I guess it must be other way around. Code checked in to master has to be in Feature. And the one in Feature need not be in master. – Mohamed Anees A Apr 03 '19 at 03:42
-
In such a case, you will need to periodically merge master into Feature branch. That would solve your problem – Mohamed Anees A Apr 03 '19 at 03:43