DevOps Classroom notes 05/Mar/2026

Lets continue commits and create a mental model (visual git)

  • Lets create directory and make commits
mkdir commit_graphs
cd commit_graphs/
git init
touch Readme.md
git status
git add .
git commit -m "first"

Preview

  • Now lets make some more changes
echo "hello" > Readme.md
git status
git add .
git commit -m "second"

Preview

  • few more
echo "hello1" >> Readme.md
git status
git add .
git commit -m "third"

echo "hello2" >> Readme.md
git status
git add .
git commit -m "fourth"


echo "hello3" >> Readme.md
git status
git add .
git commit -m "fifth"

Preview

  • Git always points to latest commit.
  • What git is pointing is denoted by HEAD
  • In git this graph starts with a default name called as master.
    Preview
  • Commit id is SHA1 Hash of

    • previous commit
    • current changes
    • author
    • datetime
    • message
  • Git only tracks files not folders
  • Using git add
git add <filename>
git add . # Add all changes in current and child directories
git add -A # Add all changes
git add -u # Add only modified changes
  • Lets learn what is untracked and modified
    • untracked: is a new file which was not part of git commits
    • modified: existing file which was part of git commits changed
    • deleted: existing file which was part of git commits deleted
    • renamed (it will appear in staging area)

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