DevOps Classroomnotes 14/Sep/2022

Merging changes between two branches

  • Consider the following DAG
    Preview
  • We have create a new branch poc_1.
  • Done some commits, the master branch didn’t change
  • Now when we merge, it would be enough if the master starts pointing towards the latest commit of poc_1 branch.
  • This is called as Fast Forward
    Preview
  • To merge the changes, switch to the branch you want to merge changes to (destination) and then execute command git merge <source-branch>
git checkout master
git merge poc_1

Preview
* We can skip fast forwarding git merge <source-branch> --no-ff

  • Consider the following DAG
    Preview
  • Git history
    Preview
  • Now we want changes done in poc_1 branch onto master
  • When merging the changes, automatic merges by git will fail when there are conflicting situations which are referred as merge-conflicts
    Preview
    Preview
  • Fix the changes
    Preview
    Preview
    Preview
  • This way of merging is referred as three way merge
  • Consider the following DAG
    Preview
  • After create the POC_1 from master branch, an important commit that needs to be part of POC_1 is committed to master.
    Preview
    Preview
    Preview
    Preview
  • DAG
    Preview

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

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

Please turn AdBlock off
Animated Social Media Icons by Acurax Wordpress Development Company

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube