Refactor: add is_git_repo? method in utils

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Not fail if no privilege to commit something

Grep one more commit error output: /nothing added to commit/

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Bugfix: checkout failed if not set gitdir

If not set gitdir, it will affect current repository!

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Call safe_system which borrow from homebrew

New safe_system method which is a wrapper for fork and exec, and will
raise Exception if command return false.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
New Tty class for pretty output

Tty class is borrow from homebrew.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>
Update gistore using subcmd: gistore update

Add new subcommand: update, which is borrowed from homebrew.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>