Starting with Git & GitHub: The Developer’s New Home

By | July 21, 2019

Hi Everyone!

Welcome to my blog again. In this post, I am going to write about some of the very important Git Commands.

So, before we start with Git Commands, it is important to understand how it is different from GitHub.

While Git is a command line tool, GitHub provides a Web-based graphical interface. GitHub provides hosting for software development version control using Git. It is a subsidiary of Microsoft.

How to get started with Git Commands?
Git Commands to set username and email
It is important to configure your Git username and email address, since every Git commit will use this information to identify you as the author.
On your Git Bash,type the following command:-

  1. git config –global “YOURUSERNAME” (To add your username)
  2. git config –global “”
    (to add your email address)

Git Commands to Clone a repository
repository path:
Clone via HTTPS:
git clone (git clone repositorypath)
Clone via SSH:
git clone (git clone repositorypath)

Git Commands to Push a Code
git branchname (create new brachname)
git checkout branchname(To switch the branch that you have created)
git status (To check the status of your changes)
git add FILE OR FOLDER (when you want to add only specific file or folder)
git add . (To add and commit all local changes)
git commit -m “COMMENT TO DESCRIBE THE COMMIT” (Commit your changes).
git push origin branchname (To push all local commits to your branch that you created)

Please follow and like us:

Leave a Reply

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