Merge and cherry-pick
- Merging branches is one way of bringing changes from one branch to other.
- As of now of status of the branch is as follows
- Lets create a branch from rel_tata_v1.0 and call it as feature_1001
- The changes which i have done on the feature_1001 branch i want them to be brought to rel_tata_v1.0
- The way to do this is called as merge. You checkout to the branch where the code has to be merged
- This merge is referred as fast-forward merge
- Lets create a branch from rel_wipro_v1.0 and call it as feature_1002
- In rel_wipro_v1.0 now make a change and create new commit
- In feature_1002 branch make changes and create a new commit
- Now merge the changes from feature_1002 to rel_wipro_v1.0
- When we perform some operations in Git like merge, rebase, cherrypick, pull etc will lead to a situation which is referred as merge conflict.
- Move to the feature_1002 branch
- Lets assume we need the commit 4b6072d into the rel_tata_v1.0 branch
- Now move to the rel_tata_v1.0 branch and perform cherry pick