Theme NexT works best with JavaScript enabled
0%


IMPORTANT:
Some of the content here is a personal summary/abbreviation of contents on the Offical Git Guide. Feel free to refer to the official site if you think some of the sections written here are not clear.


Git Intro

  • Version Control
    • Version control is a system that records and manages changes for a file or a set of file, so that you could later revert those changes if needed
  • Why Version Control
    • Many default version-control method of choice is to simply copy files into another directory, and renaming them somehow to keep track of the changes
    • however, this could be inconvenient and error prone
  • Solutions
    • One of the most popular VCS tools was a system called RCS, which is still distributed with many computers today. RCS works by keeping patch sets (that is, the differences between files) in a special format on disk; it can then re-create what any file looked like at any point in time by adding up all the patches.
      • Problem
        • The next major issue that people encounter is that they need to collaborate with developers on other systems.
    • Centralized Version Control Systems (CVCSs) were developed as a solution to the problem above. These systems (such as CVS, Subversion, and Perforce) have a single server that contains all the versioned files, and a number of clients that check out files from that central place. For many years, this has been the standard for version control.
      • Advantages
        • everyone knows to a certain degree what everyone else on the project is doing. Administrators have fine-grained control over who can do what, and it’s far easier to administer a CVCS than it is to deal with local databases on every client.
      • Problems
        • If that server goes down for an hour, then during that hour nobody can collaborate at all or save versioned changes to anything they’re working on. If the hard disk the central database is on becomes corrupted, and proper backups haven’t been kept, you lose absolutely everything — the entire history of the project except whatever single snapshots people happen to have on their local machines.
    • Here Distributed Version Control Systems (DVCSs) step in. In a DVCS (such as Git, Mercurial, Bazaar or Darcs), clients don’t just check out the latest snapshot of the files; rather, they fully mirror the repository, including its full history. Thus, if any server dies, and these systems were collaborating via that server, any of the client repositories can be copied back up to the server to restore it. Every clone is really a full backup of all the data.
      • Advantages
        • you can collaborate with different groups of people in different ways simultaneously within the same project. This allows you to set up several types of workflows that aren’t possible in centralized systems, such as hierarchical models.

Git Setup

Please follow the offical documentation for setup and installation.

Getting Help in Git

To get more information about a command in Git, use any of the three below:

1
2
3
$ git help <verb>
$ git <verb> --help
$ man git-<verb>

It is recommended to use git <verb> --help because it sticks to the pattern of command line code. For example, for a quick refresher on the available options for a Git command, you do git <verb> -h

  • Notice
    • Those commands are accessible even offline

Git Basics

  • Getting a Git Repository
    This can be done in two ways

    1. take a local directory that is currently not under version control and turn it into a Git repository
    2. clone an existing Git repository from elsewhere

    Then you will end up with a Git repo on your local machine

    Read more »

Line Breaks and Indentation

The content is basically the same as that of the Jupyter notebook

There will be a space between the previous line

This will be no space if I add two or more spaces at the end of this line
see, no space between a new line

This is is how to do block quotes

A: quote 1
You could also have paragraphs in a block quote if you add the symbol > in front

Here is a new line

This is how you add and image (the label will show if the image is not properly loaded):

This is how you create a link:
My Blog

Code Snippets

From now on it is only supported in Github Flavored Markdown

This is how you create a code snippet:
main()

1
int i = 0;

Strike-Through text

this

https://github.com/jlord/sheetsee.js/issues/26

Tables

A standard table:

First Header Second Header
Content cell 1 Content cell 2
Content column 1 Content column 2
Read more »