Skip to content

Instantly share code, notes, and snippets.

View ilaipi's full-sized avatar
🇨🇳

杨亚梦 ilaipi

🇨🇳
  • 上海~静安
View GitHub Profile
@markSci5
markSci5 / Git checkout remote branch
Created July 3, 2013 07:08
Git checkout remote branch
//To fetch a branch, you simply need to:
git fetch origin
//This will fetch all of the remote branches for you. With the remote branches
//in hand, you now need to check out the branch you are interested in, giving
//you a local working copy:
git checkout -b test origin/test
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@kitek
kitek / gist:1579117
Created January 8, 2012 17:50
NodeJS create md5 hash from string
var data = "do shash'owania";
var crypto = require('crypto');
crypto.createHash('md5').update(data).digest("hex");