Must Know Git Commands

Git

Intro

Git is a powerful version control system that lets you track changes and collaborate with others.

I'm not covering the basics of git, just showing some functionality to intermediate users

I consider the understanding of below commands to be the prerequisite for the main part of this post, so just have a look

  • git status – check the state of your working tree
  • git add <file> – stage changes for commit
  • git commit -m "message" – save staged changes
  • git push – upload local commits to the remote repository
  • git pull – fetch and merge updates from the remote repository
  • git checkout -b <branch> – create and switch to a new branch
  • git merge <branch> – merge another branch into the current one
  • git log – view commit history

Main Part

  • git diff --stat – see changes between commits or the working tree
  • ge to see changes before commit

    Post Categories

    Software Engineering 1
    Web Development 1

    Reaching Out

    Contact me