DevOps Classroomnotes 27/Apr/2022

Git Branches

  • In Git HEAD is a pointer which refers to what should be shown on the working tree and ideally HEAD should be pointing towards a branch or a tag.
  • Now lets create a branch for tata group rel_tata_v1.0
    Preview
  • Now lets move the HEAD (move to rel_tata_v1.0) branch
    Preview
    Preview
  • Now lets add a change in rel_tata_v1.0 branch
    Preview
    Preview
    Preview
  • Now lets move to the master branch
    Preview
    Preview
  • Now lets create one more branch for wipro group rel_wipro_v1.0
    Preview
    Preview
    Preview
  • If the HEAD is pointing towards a commit rather than a branch or a tag this state is referred as DETACHED_HEAD.
  • When you are in a detached head, you are expected only to view the files not make any changes
    Preview
    Preview
  • To recover from detached head state, just use the checkout command and give any branch or tag name
    Preview

How Git Works (Local Repository)

  • Git is a content tracker
  • In Git branch points to a commit id.
  • COMMIT ID in GIT is an SHA1 Hash
  • note: please go through the recording to understand the concept of hashing
    • Two different contents cannot have the same hash
  • Git commit is the SHA1 hash of
    • author
    • message
    • timestamp
    • changes done in that specific commit.
  • To be continued in the next session.

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