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>

  • To checkout to a branch (HEAD pointing to other branch)

  • Now lets do a couple of commits

  • 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 ReplyCancel reply

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

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%