Git commands

Git Basic Commands

  1. init
     git init
    

    creates a .git directory (a repository) in the working directory and makes git functionality available.

  2. clone
     git clone <url of website>
    

    creates a directory with the same name as the repo and downloads from the remote origin all of the files in the repo.

  3. status
     git status
    

    displays information about files that have been modified.

    Before any modifications:

    On branch master

    Your branch is up-to-date with ‘origin/master’.

    nothing to commit, working tree clean

  4. branch
     git branch branch_01
    

    This creates a reference or checkpoint. (commits are a special sort of reverence of checkpoint called a revision.)

Git commands

  1. In the terminal
     git init
    

2 . Copy the git remote add … code and run in terminal

  1. In terminal
     git push --set-upstream origin master