All About Git Commands

All Major Commands Related to Git

All About Git Commands

Table of contents

No heading

No headings in the article.

  • To clone repository from github to local server

    • git clone https://github.com/YOGINIMAHIMA1/GIT-COMMANDS-.git

    • git status - to check the status of all file

    • git status -s -> to check the status in short

    • ls - to check total number of files

    • git add file name- to add the particular file.

    • git add . - to add all the files

    • git init- to convert project into repository

    • git restore file name - to restore the previous version of file i.e it will will discard the changes we have done in any file

    • git commit -m "add text here" - this is the message which is shown in github message box.

    • git commit -a -m "modified the text" - this command will add add and modified .

    • git push - it will push the repository into cloud based service i.e Github , Gitlab etc.

    • git confilg --global username "USERNAME"

    • git config --global email ""