DevOps Classroom notes 23/Mar/2025

Git Contd..

To Staging Area

  • Add all changes git add -A
  • Add only modified files but not untracked

ignoring files

  • To ignore certain files, in the root folder of repository create a file called as .gitignore
  • To remove all untracked files from working tree git clean -fd .

Git branch

  • Refer Here for docs
  • Branch always points to latest commit on it
  • In Git default branch is master and now a days majority of the organizations have moved to main as default branch.
  • To rename branch git branch -m <new-name>
  • To create a new branch git branch <new-branch-name>
    Preview
    Preview
  • To checkout to a branch (HEAD pointing to other branch)
    Preview
    Preview
  • Now lets do a couple of commits
    Preview
    Preview
  • Lets checkout to main

Git Tag

  • Refer Here for docs
  • Tag always points to a specific commit

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