TalkDevops.com

TalkDevops.comTalkDevops.comTalkDevops.com
Home
About Us
Trainings
  • Introduction
  • CI and CD
  • Git
  • Linux
  • Docker
  • Kubernetes
  • Azure
  • AWS
  • Terraform
  • MLOps
Blogs
Projects
Webinars
Contact Us

TalkDevops.com

TalkDevops.comTalkDevops.comTalkDevops.com
Home
About Us
Trainings
  • Introduction
  • CI and CD
  • Git
  • Linux
  • Docker
  • Kubernetes
  • Azure
  • AWS
  • Terraform
  • MLOps
Blogs
Projects
Webinars
Contact Us
More
  • Home
  • About Us
  • Trainings
    • Introduction
    • CI and CD
    • Git
    • Linux
    • Docker
    • Kubernetes
    • Azure
    • AWS
    • Terraform
    • MLOps
  • Blogs
  • Projects
  • Webinars
  • Contact Us

  • Home
  • About Us
  • Trainings
    • Introduction
    • CI and CD
    • Git
    • Linux
    • Docker
    • Kubernetes
    • Azure
    • AWS
    • Terraform
    • MLOps
  • Blogs
  • Projects
  • Webinars
  • Contact Us

What is git

 Git is a version control system used to track changes in source code during software development. It allows multiple developers to work on the same project simultaneously without overwriting each other's work. Git helps you manage your code history, collaborate with others, and roll back to previous versions if needed. 

GIT Commands Cheatsheet

git init

git init command initializes a new repository or reintializes a existing repository. It will create a .git file that allows you to use git commands.

Example: git init .

git branch

git branch command displays the current local branch which we are working.

Example: git branch

git checkout

git checkout command checks out to the branch. Append the command with branch name to checkout to the desired branch.

Example: git checkout <branchname>

git merge

git merge command combines the changes from one branch to another branch.

Example: git merge <branchname>

git add

git add command stage changes in your current working directory whether it can be a single file or entire folder.

Example: git add readme.md (or) git add .

git commit

git commit command saves the changes staged in local repository with unique ID including comments of the changes.

Example: git commit -m "my changes"

git pull

git pull command gets all the changes from the remote repository to your local branch.

Example: git pull <remote> <branchname> 

git push

git push command transfers your local commits from your own branch to centralized remote repository.

Example: git push <remote> <branchname>

git fetch

git fetch unlike git pull downloads only the latest changes from remote repository.

Example: git fetch <remote>

git diff

git diff command shows the differences between branches before committing or after pulling.

Example: git diff (or) git diff <branchname1> <branchname2>

git status

git status command displays the current state of the working directory such as untracked files, changes that are going to commit.

Example: git status

git log

git log command shows the history of commits in your repository with most recent changes.

Example: git log (or) git log --author="name"

Video

Sessions to be added

Talk DevOps

Copyright © 2025 Talk DevOps - All Rights Reserved.

Powered by

This website uses cookies.

We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.

Accept