Customise Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorised as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyse the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customised advertisements based on the pages you visited previously and to analyse the effectiveness of the ad campaigns.

No cookies to display.

Basic Git commands

Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • User AvatarKiran Dalvi
  • 17 Jul, 2019
  • 0 Comments
  • 1 Min Read

Basic Git commands

Git is an Open Source Distributed Version Control System. Git has a remote repository which is stored in a server and a local repository which is stored in the computer of each developer. This means that the code is not just stored in a central server, but the full copy of the code is present in all the developers’ computers.

The git init command can be used to initialize git repository used in project directory.

$ git init

The git clone command can be used to get a copy of an existing Git repository.

$ git clone [URI]

The git add command can be used in order to add files to the index. For example, the following command will add a file named blognow.txt present in the local directory to the index:

$ git add blognow.txt

To add all files to the index following command can be used.

$ git add *

The git commit command commits any files you’ve added with the git add command and also commits any files you’ve changed since then.

$ git commit -m “commit message”

The git push command send changes to the master branch of your remote repository.

$ git push origin master

The git status command displays the list of changed files along with the files that are yet to be added or committed. 

$ git status

The git rm command deletes the file from your working directory and stages the deletion.

git rm blognow.txt