GIT Cheatsheet

The basics Git commands

Β·

1 min read

What's GIT

GIT a version control system-Git is used to tracking changes in the source code-Git is the distributed version control tool is used for source code management.

Basic Git Commands

  • git init : This command initialize a new empty repository in your system
$ git init
  • git clone : This command copy the exact files from an existing URL
$ git clone URL
  • git commit : This command record the file in the version history.
$ git commit -m
  • git status : This command shows all the files which needs to be committed.
$ git status
  • git remote: This command is used to connect your local repository to the remote server.
$ git remote add [variable name] [Remote Server Link]
  • git push: Push all of your local branches to the specified remote.
$ git push [variable name] master
  • git branch: List all of the branches in your repo. Add a argument to create a new branch with the name
$ git branch [branch name]
  • git merge: Merge into the current branch
$ git merge [branch name]
Β