Cheat Sheet

Configure Tooling

Configure user information for all local repositories.

Create Repositories

Start a new repository or obtain one from an existing URL.

Make Changes

Review edits and craft a commit transaction.

Group Changes

Name a series of commits and combine completed efforts.

Refactor Filenames

Relocate and remove versioned files.

Suppress Tracking

Exclude temporary files and paths.

Save Fragments

Shelve and resotre incomplete changes.

Review History

Browse and inspect the evolution of project files.

Redo Commits

Erase mistakes and craft replacement history.

Synchronize Changes

Register a repository bookmark and exchange version history.

LaTex in Github

GitHub markdown parsing is performed by the SunDown library. The motto of the library is “Standards compliant, fast, secure markdown processing library in C”. The important word being “secure” there. Indeed, allowing javascript to be executed would be a bit off of the MarkDown standard text-to-HTML contract. Moreover, everything that looks like a HTML tag is either escaped or stripped out.

You can use to render LaTeX formulas as PNG. It work nicely with Github’s markdown.




Sometimes you have to encode the url:



Useful website:

Interactive LaTeX Editor

Page Jumping in Github

Github through the Anchor (anchor) to achieve the page jump, each title is a Anchor.

A page jump must following:

So if we have a title:

# Page Jumping!

The link will be:

[Page Jumping!](#page-jumping)

Now we can achieve a Markdown catalogue by this way.

Update forked repo

First you need to add a remote that points to the upstream repository.

$ git remote -v
origin (fetch)
origin (push)

$ git remote add LCTT
$ git remote -v
LCTT (fetch)
LCTT (push)
origin (fetch)
origin (push)

Than fetch from the remote repository.

$ git fetch LCTT

Now we have the upstream’s master branch stored in a local branch.

$ git branch -va
* master                ab2f09b43 translating by firmianay
  remotes/LCTT/master   b3f794dfa PRF&PUB:2017 Cloud Integrated Advanced
  remotes/origin/HEAD   -> origin/master
  remotes/origin/master ab2f09b43 translating by firmianay

Merge local branch.

$ git merge LCTT/master

Finally we can push to github.

$ git push