DevOps Classroomnotes 17/Feb/2023

Git Contd

  • What Git Commit is?
    Preview
  • Work done so far
    Preview
  • We have create a new folder and done the activites as shown below
    Preview
    Preview
  • Now lets check for status
    Preview
  • Lets make 3 changes (2 in existing files in commit and create a new file)
    Preview
  • In Git Untracked files are the files that were not part of local repo and a new file is created.
    Preview
  • Now commit the changes
  • Preview
  • HEAD is a pointer which generally points to latest commit, Working tree will populate the contents based on HEAD which refers to commit
  • Add some changes to staging area
    Preview
  • To remove the changes from working tree for a tracked file
    Preview
  • Lets see how to remove untracked which is in staging area
    Preview
    Preview
    Preview
  • Now lets create a 3 commit
    Preview
  • git log in short form git log --oneline
    Preview
  • In Git by default there will be one branch which is called as master which looks at latest commit id.
  • Checkout commands moves the HEAD position. By default as master points to latest commit, HEAD points to master. IF you want navigate back in history git checkout <commit-id> to get back to latest commit git checkout master
  • Note: checkout has other flavors which we are yet to know.
    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 Responsive Web Designing 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