Getting started with git

Some background information

  1. The importance of version control.
  2. What is git?
  3. How to install git?
  4. What is GitHub?

Basic git commands

Summarized from this page.

Create a repository from the current working directory

In the current folder, type $ git init. This creates .git folder which contains all necessary files for this repository.

Clone a existing repository from GitHub

$ git clone where is the URL of the existing repository in GitHub.

Commit changes and push to GitHub repositiory

After making some changes (edit files, create and remove files), you can check the status of the current repository by typing $ git status.

A list of untracked files will be listed. In order to start version-controlling those files, use $ git add * (or add only files / file types that you would like to track).

Then you can commit the changes you have made with $ git commit -m "type some message here" and update the corresponding GitHub repository by typing $ git push.

<to be continue>