Posts

Showing posts with the label Git

[Level 1] Lost and Found in git

Once you get lost in git and you could try to find it by the following commands $ git fsck --lost-found $ git reset HEAD@{1} Wish this helps. regards, Stanley Huang

[Level 1] Reversion of git

Just read an article mentioned about the reversions of git, so take a note here. G H I J \ / \ / D E F \ | / \ \ | / | \|/ | B C \ / \ / A A = = A^0 B = A^ = A^1 = A~1 C = A^2 = A^2 D = A^^ = A^1^1 = A~2 E = B^2 = A^^2 F = B^3 = A^^3 G = A^^^ = A^1^1^1 = A~3 H = D^2 = B^^2 = A^^^2 = A~2^2 I = F^ = B^3^ = A^^3^ J = F^2 = B^3^2 = A^^3^2 reference: http://schacon.github.io/git/git-rev-parse#_specifying_revisions Wish this helps. regards, Stanley Huang

[Level 1] git ignore

If you want git not to commit some temporary files or log files...etc., you could create .gitignore file to ignore them. If you don't have any idea about which file should be ignore, you could also download ignore templates that prepared by github. mkdir ~/git-home cd ~/git-home git init git clone https://github.com/github/gitignore cd ~/my_py_project cp ~/git-home/gitignore/Python.gitignore ./.gitignore Wish this helps. regards, Stanley Huang

[Level 1] Create git repository by command.

A script for creating git repository quickly. http://viget.com/extend/create-a-github-repo-from-the-command-line Wish this helps. regards, Stanley Huang

[Level 1] Install git in Ubuntu

If you want to install git in Ubuntu, you could use apt-get command: # apt-get -y install git-core git-doc git-gui gitk Wish this helps. regards, Stanley Huang