DevOps Classroom notes 15/Nov/2023

Git Contd

Git Reference Objects

  • We have 3 reference objects
    • branches
    • tags
    • HEAD
    • remote
  • Reference objects are pointers which points to other reference or commit id.

Branches in Git

  • Refer Here for branches
  • Branches are created for having independent line of development
  • lets list out the branches
    Preview
  • Lets create a branch
    • branch: marutisuzuki
      Preview
      Preview
  • Lets start working in marutisuzuki branch
git checkout marutisuzuki

Preview
Preview
* Now lets add one change
Preview
Preview
* Now lets checkout to master branch
Preview
* Lets make a new commit in master branch
Preview
Preview

  • Merge is an operation to bring all the changes from one branch to another
  • Lets merge changes from marutisuzuki to master
    • Target branch: master
    • source branch: maruti suzuki
  • Steps:

    • Checkout to target branch
      git checkout master
    • merge the changes from source branch
      git merge marutisuzuki
      Preview
      Preview
  • Lets understand how git works. Please follow classroom recording for understanding how git works

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner