DevOps Classroomnotes 21/Feb/2023

Git Contd..

Git Branch

  • Branch allows us to have parallel development in the same repository
  • Create a new local repo (git init) and make first commit
    Preview
  • Branch to a git is a pointer to a commit id which is latest commit on the branch
    Preview
  • Lets create a new branch REL_v1.0 (Release for v1.0)
    Preview
    Preview
  • Lets move to REL_v1.0 branch
    Preview
    Preview
  • Now lets add a commit to REL_v1.0 branch
    Preview
    Preview
  • Now lets move to master and look at history
    Preview
    Preview
  • Now lets add a commit to master branch
    Preview
    Preview
  • Once we have these branches there will be needs to bring changes from one branch to another. To acheive this we need to work with

    • merge
      • Three way merge
      • no fast forward merge
    • Rebase
    • cherry pick
  • When we do any of the above, there might be cases leading to conflicts (merge conflicts)

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner