• git init
  • git add
  • git commit
  • git push
  • git status
  • git log
  • git branch
  • git branch -M
  • git config username
  • git config email
  • git remote add origin

•git init

The command git init is used to create an empty Git repository.
SYNTAX: git init

Image description

•git add

Add command is used after checking the status of the files, to add those files to the staging area.
SYNTAX: git add

Image description

•git commit
The commit command makes sure that the changes are saved to the local repository.
SYNTAX: git commit -m “message”

Image description

•git push

The command git push is used to transfer the commits or push the content from the local repository to the remote repository.
SYNTAX: git push -u origin master

Image description

•git status
The git status command tells the current state of the repository.
SYNTAX: git status

Image description

•git log
Displays committed snapshots
SYNTAX: git log

Image description

•git branch
The git branch command is used to determine what branch the local repository is on.
SYNTAX: git branch
git branch -m (To change branch from master to main)

Image description

•git config
The git config command is used initially to configure the user.name and user.email.This specifies what email id and username will be used from a local repository.
SYNTAX: git config --global user.name “any user name”
git config --global user.email

•git remote add origin

Used to add a new remote repository to your local project.

Image description