DevOps Classroomnotes 29/Apr/2022

Git Contd

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


Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Customized Social Media Icons from Acurax Digital Marketing Agency

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%