Sunday, November 22, 2009

Setup a remote git repository

Create an empty repository on the server:

ssh server
cd /git && mkdir myproj.git
cd myproj.git && git --bare init


Initialize a local repository and push it to the server:

git init
git add .
git commit -m "first time import of ..."
git remote add origin ssh://server/git/myproj.git
git push origin master


Other useful commands:

git remote show origin

adb and Karmic

I still kept an Android Sapphire phone. It is fun to use it play with modified version of Android OS.

Recently, I upgraded my workstation from Ubuntu 9.04 to 9.10 and suddenly adb couldn't find Sapphire phones. A few things changes since 9.10:

1. /etc/udev/rules.d/51-android.rules use ATTR instead of SYSFS

SUBSYSTEM=="usb", ATTR{idVendor}="0bb4", MODE="0666"


2. /lib/udev/rules.d/50-udev-default.rules needs a small change:

# libusb device nodes
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"

By default, MODE="0664" and you need to change it to "0664".

Happy hacking!