git user guide

1. git configuration in ".gitconfig":

[user]
        name = Haibing.Yang
        email = yanghb41@gmail.com
[color]
        ui = auto
[commit]
        template = /home/xxx/.commit_template
[remote "kernel"]
  url = ssh://yang.haibing@10.0.64.28:29418/kernel/common
  receivepack = git receive-pack --reviewer=yanghb41@gmail.com --cc=yanghb41@gmail.com
[remote "u-boot"]
  url = ssh://yang.haibing@10.0.64.28:29418/u-boot
  receivepack = git receive-pack --reviewer=yanghb41@gmail.com --cc=yanghb41@gmail.com
[core]
        editor = vim

git commit:

git commit -a -s -e

2. how to solve conflict

#git remote -v
kernel ssh://haibing.yang@10.0.64.28:29418/kernel/common (fetch)
kernel ssh://haibing.yang@10.0.64.28:29418/kernel/common (push)
korg gitadmin@gitsrv01.spreadtrum.com:android/kernel/common (fetch)
korg gitadmin@gitsrv01.spreadtrum.com:android/kernel/common (push)
u-boot ssh://haibing.yang@10.0.64.28:29418/u-boot (fetch)
u-boot ssh://haibing.yang@10.0.64.28:29418/u-boot (push)
# git fetch korg
# git rebase korg/sprdlinux3.10

If conflict happens, first, modify the conflict, then do the following:
# git add [conflicted files]
# git rebase --continue
# git push xxx HEAD:refs/for/branch

First, rewinding head to replay your work on top of it...
Fast-forwarded HEAD to korg/sprduboot.

If you encounter the above error, issue the following command
# git rebase master
Then issue 
# git rebase korg/sprduboot


3. create git server and git client

3.1 create git server
# git init --bare present.git

3.2 create git client
# git init
# git clone /work/robbie/smartphone_work/mydroid/present.git/
# git add ...
# git commit .-m "initial code"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值