git分支协作

分支协作:
git config --add remote.origin.fetch +refs/heads/personal/owner/*:refs/remotes/origin/personal/owner/*
git fetch
gb -r | grep zguozhi


新建个人分支:
git checkout -b   personal/zwuxzey/dra_3-6Tone_reducetone_2ue  origin/personal/zduxjin/dra_3-6Tone
如要跟新到最新的patch:
cherry-pick gerrit上所要基于的本地分支的远程链接.
如果要在远端同步本地的新分支:
新建个人分支后,git push origin personal/zwuxzey/dra_3-6Tone_reducetone_2ue
推送commit到远端:
git push origin HEAD:refs/for/personal/zwuxzey/dra_3-6Tone_reducetone_2ue




git pull origin personal/zguozhi/DIAS/feature/3-6Tone
git pull origin HEAD:refs/for/personal/zguozhi/DIAS/feature/3-6Tone 
git rebase origin/personal/zguozhi/MR5033_SP4_CXP9024418_6-R43A79


git diff HEAD^ HEAD ./body/shdActivator/test/body/shdActivator/src/dranbce_shdactivator_scheduler_tc.c

git fetch ssh://zwuxzey@gerrit.ericsson.se:29418/lte/ebb refs/changes/85/3642285/1 && git checkout FETCH_HEAD

git diff d98b29cb6   ecf2d63e74c 查看某两个版本的差异
git diff d98b29cb6 filepath 与某一次提交进行比较


error: Your local changes to the following files would be overwritten by checkout:
.省略中间部分
Please move or remove them before you can switch branches.
出现这个错误时:可以通过以下的命令处理:
git clean  -d  -fx ""
1. x :表示删除忽略文件已经对git来说不识别的文件 
2. d: 删除未被添加到git的路径中的文件 
3. f: 强制执行


> fatal: Invalid refspec ' +refs/heads/dev/syntax:refs/remotes/origin/dev/syntax' 
> > What to do? Any hint is highly appreciated. 
Use an editor on .git/config to remove the offending line(s). 
来自 <http://lilypond.1069038.n5.nabble.com/git-problem-fatal-Invalid-refspec-td136458.html> 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值