DevOps Classroom notes 04/Dec/2026

untracked and trcaked changes

  • untracked – changes are done or files edited or created in working directory is untracked files

  • tracked – changes ready for commit (staging files are ready for commit)

git restore --staged <files path>

cheat-sheet

git logs

# shows all commits and changes 
git log 

##  all details in single line for every commit 
git log --oneline

### get log for specific branch 
git log <branch name>

## graph
git log --graph <branch name>

Move Between Branches

  1. changes or switch exits branch
## Switch branches:
git switch <name>
OR
git checkout <name>

## Create a branch:
git switch -c <name>
OR
git checkout -b <name>

## List branches:
git branch

## List branches by most recently committed to:
git branch --sort=-committerdate

## Delete a branch:
git branch -d <name>

## Force delete a branch:
git branch -D <name>

Task:

  1. create branches names dev, stg, qa, main/master
  2. add different files in all branches
  3. Try all above branch commands

Leave a comment

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
Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube