Introduction

Basic commands

End

Git Basics For Beginners

Introduction

Git is a version control system. It was originally developed by Linus Torvalds, the creator of Linux kernel. With git we can maintain different versions of projects to maintain the flow easily.


Basic commands

  • log
  • status
  • add
  • commit
  • push

You can refer to the official docs of git to learn more.


​​git log lists all the commits on current branch

git log

git status shows all the updated changes in the current branch

git status

git add is used to add specified changes before commit

# to add all the changes
git add .
# to add a specific change
git add <filename>
git add <foldername>

git commit is used to commit the changes

 The -m flag is used to specify a commit message

git commit -m 'first commit'

git push is used to apply the changes on the remote branch

git push -u origin master
Tags