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 chart.apis.google.com to render LaTeX formulas as PNG. It work nicely with Github’s markdown.

Example

![](http://chart.apis.google.com/chart?cht=tx&chl=E_k=mc^2-m_0c^2)

![](http://chart.apis.google.com/chart?cht=tx&chl=m=\frac{m_0}{\sqrt{1-{\frac{v^2}{c^2}}}})

Sometimes you have to encode the url:

wrong:
![](http://chart.apis.google.com/chart?cht=tx&chl=\begin{bmatrix}x_1&x_2&x_3\end{bmatrix})

true:
![](http://chart.apis.google.com/chart?cht=tx&chl=%5Cbegin%7Bbmatrix%7Dx_1%26x_2%26x_3%5Cend%7Bbmatrix%7D)

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  https://github.com/firmianay/TranslateProject.git (fetch)
origin  https://github.com/firmianay/TranslateProject.git (push)

$ git remote add LCTT https://github.com/LCTT/TranslateProject.git
$ git remote -v
LCTT    https://github.com/LCTT/TranslateProject.git (fetch)
LCTT    https://github.com/LCTT/TranslateProject.git (push)
origin  https://github.com/firmianay/TranslateProject.git (fetch)
origin  https://github.com/firmianay/TranslateProject.git (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 Orchestrator.md
  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