/***********************************************************************************/
GIT create an open ID account for Git/gerrit server : 丁麗丹 lidanding@wistronits.com
/***********************************************************************************/
brian@ubuntu:~$ sudo apt-get install git // NAT 方式
brian@ubuntu:~$ git config --global user.name "lidanding" // 同 Username
brian@ubuntu:~$ git config --global user.email "lidanding@wistronits.com"
brian@ubuntu:~$ ssh-keygen -t rsa -C "lidanding@wistronits.com" // 生成密钥
brian@ubuntu:~/.ssh$ cat id_rsa.pub // 拷贝密钥到GIT网站 setting->SSH public keys
login in GIT web
http://10.34.65.19:8090/
google : lidanding@wistronits.com wh118991! // lidan ding <lidanding@wistronits.com>
// info of git web page
Username lidanding
Full Name lidan ding
Email Address lidanding@wistronits.com
Registered Aug 24, 2011 5:56 PM
Account ID 24
$ cd sharefolder/workspace/snoopy/p5_ipp_linux/voice/pform/linux/mxp/sapp/
第一次下載。
$ git clone [-b P0B] ssh://lidanding@10.34.65.19:29418/snoopy/sccp // 生成密钥时设置的passwd 123456
git clone -b P0B ssh://lidanding@10.34.65.19:29418/snoopy/filesystem // download P0B image!
特別要注意的是,之後 你要在做任何修改程式碼的動作前,務必要先執行:此動作會將你跟GIT上的版本作同步
$ git pull ssh://lidanding@10.34.65.19:29418/snoopy/sccp HEAD:refs/for/master
會秀出目前你修改、新增、移除的程式檔跟 剛才下載的版本 差益處
$ git status
添加文件
$ git add sapp_cfg.c
提交更改到git本地库中
$ git commit -m "added by lidan for PR643"
把更新推送到远程git中心库中
$ git push ssh://lidanding@10.34.65.19:29418/snoopy/sccp HEAD:refs/for/master
P0B---------------------------------------
GIT_src/filesystem$ git pull ssh://lidanding@10.34.65.19:29418/snoopy/filesystem P0B:refs/for/P0B
Already up-to-date.
$ git push ssh://lidanding@10.34.65.19:29418/snoopy/filesystem P0B:refs/for/P0B