How to move your old repo to github

Before you begin, you might want to add your ssh key into your github account.

// push master branch
$ cd /repo-directory
$ git remote rename origin bitbucket
$ git remote add origin
$ git push origin master
$ git remote rm bitbucket
// push another branch
$ git checkout develop
$ git push origin -u develop

Arcanist cheatsheet

$ arc patch D123
$ git add .
$ git commit -am "update"
$ arc diff --update D123
$ arc land --revision D123

Update diff to master

$ git checkout master
$ git merge arcpatch-D123
$ git push

Make a diff from current working branch

$ git add.
$ git commit -am "update"
$ arc diff --update D123

Push to working branch without land

$ git add .
$ git commit -am "update"
$ git push origin lol-branch

Make a diff from working branch from the first update

$ git checkout lol-branch
$ git add.
$ git commit -am "update"
$ arc diff master

Git cheatsheet

list branch

git branch

rename branch

git branch -m <newname>

move to another branch

git checkout your-branch

hard reset branch

git reset --hard origin/master

create new branch

git checkout -b new-branch

delete local branch

git branch -D your-branch

merge from develop to master

git merge develop

init on existed project and push master for the first time

git init
git remote add origin ssh://
git add .
git commit -am "initial commit"
git push -u origin master