DevOps Classroom Series – 04/Jul/2021

How Git Works

  • HEAD file in .git folder represents the branch. It should ideally point towards the branch. If HEAD is pointing to some commit rather than branch it is called as DETACHED HEAD state
  • Use the class room recording to understand the git traversal across commits to populate working directory

Merging Branches

  • Fast-Forward: When branch moves to the latest commit of branch which we are merging from i.e considered as fast forward

  • Merge: This creates an extra commit on the destination branch which has merge commit (which has two parents)

  • Lets assume we have the branch which looks as shown below

  • Now lets assume the user has created one more commit

  • Now we need to have whatever changes which we have done on v2.0 branch in master branch also

  • Steps for merging.

    • Checkout to the branch where we need to merge git checkout <dest-branch>
    • Now execute the command git merge <source-branch>
  • Now Contents of V1.0 branch needs to be merge to master branch

  • Next Steps:

    • Searching for history and differences in commandline
    • Merge Conflicts
    • Cherry-pick
    • Re-base
    • Add the Remote Repository

Leave a ReplyCancel reply

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

Please turn AdBlock off
Social Network Integration by Acurax Social Media Branding Company

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%%