10 Important Git Commands Every Git beginners Must Know - git mascot pen drive plugged in macbook bro
10 Important Git Commands Every Git beginners Must Know - Photo by Brina Blum on Unsplash

10 Important Git Commands Every Git beginners Must Know

This article covers the Top 10 Git Commands every Git beginners must know.

We have handpicked Top 10 Git commands from a very practical point of view which are very much essential for any Git beginners to start with. Most probably even the sequence of the commands mentioned below are arranged in a way they need to be used.

Git commands Covered

  1. git config
  2. git clone
  3. git branch
  4. git checkout
  5. git status
  6. git add
  7. git commit
  8. git push
  9. git pull
  10. git merge
10 Important Git Commands Every Git beginners Must Know - Git Logo

Top 10 Git commands

1. git config

git config –global user.name “<username>”
git config –global user.email “<useremail>”
git-config – Get and set repository or global options
https://git-scm.com/docs/git-config

2. git clone

git clone <repository-url> [ eg: https://github.com/rohu2187/demo.git ]
git-clone – Clone a repository into a new directory
Create a local copy of a remote repository
https://git-scm.com/docs/git-clone

3. git branch

git branch <branch-name>
git-branch – List, create or delete branches
Create a new branch
https://git-scm.com/docs/git-branch

4. git checkout

git checkout <branch-name>
git-checkout – Switch branches or restore working tree files
Switch to a branch
https://git-scm.com/docs/git-checkout

5. git status

git status
git-status – Show the working tree status
show the status of the current working branch or repo
https://git-scm.com/docs/git-status

6. git add

git add or git add -A
git-add – Add file contents to the index
Add a file to the staging area
https://git-scm.com/docs/git-add

7. git commit

git commit -m “”
git-commit – Record changes to the repository
commit changes
https://git-scm.com/docs/git-commit

8. git push

git push -u origin
git-push – Update remote refs along with associated objects
Push changes to the remote repository (and remember the branch)
https://git-scm.com/docs/git-push

9. git pull

git pull origin master
git-pull – Fetch from and integrate with another repository or a local branch
Pull changes from remote repository
https://git-scm.com/docs/git-pull

10. git merge

git merge <branch-name>
git-merge – Join two or more development histories together
Merge a branch into the active branch
https://git-scm.com/docs/git-merge

About the author

Rohan Kamble

A Web Developer by profession, who loves the web to the core with over 9 Years of Experience working on a wide range of domains like websites on e-commerce, Travel, Alumni, matrimonial, company's professional sites, Finance, company internal communications and many more. Also WordPress Plugins & Chrome extensions.

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.