永发信息网

如何在repo里增加git project

答案:1  悬赏:30  手机版
解决时间 2021-02-14 04:59
如何在repo里增加git project
最佳答案
如何给android的mirror加入自定义project对应的git库,让repo自动管理

修改manifests基本project配置
luther@gliethttp:/vobs/git_repos/android-pub-manifests$ git show
- fetch="git://android.git.kernel.org/"
+ fetch="git://10.0.67.68/android"

+
+
一.luther@gliethttp:~$ git init sandbox.gliethttp
二.luther@gliethttp:~$ git clone --bare -l sandbox.gliethttp/.git /vobs/git_repos/android/sandbox.git
三.luther@gliethttp:/vobs/works/android-pub/sandbox$ git push korg :master
remote: error: By default, deleting the current branch is denied, because the next
remote: error: 'git clone' won't result in any file checked out, causing confusion.
remote: error:
remote: error: You can set 'receive.denyDeleteCurrent' configuration variable to
remote: error: 'warn' or 'ignore' in the remote repository to allow deleting the
remote: error: current branch, with or without a warning message.
remote: error:
remote: error: To squelch this message, you can set it to 'refuse'.
remote: error: refusing to delete the current branch: refs/heads/master
To git://10.0.67.68/android/sandbox.git
! [remote rejected] master (deletion of the current branch prohibited)
error: failed to push some refs to 'git://10.0.67.68/android/sandbox.git'

四.问题在于当前处于(no branch),
git branch -a
* (no branch)
master
remotes/korg/master
remotes/m/android-2.3.2_r1 -> korg/master
必须要有一个branch,比如可以在pool上进行push,语句如下:
git checkout -b pool
git push korg pool:master
五.需要现切换到master才行
git checkout master
六.但是push时会出现另一个错误
luther@gliethttp:/vobs/works/android-pub/sandbox$ git push
Counting objects: 9, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (7/7), 606 bytes, done.
Total 7 (delta 0), reused 0 (delta 0)
error: unpack failed: unpack-objects abnormal exit
To git://10.0.67.68/android/sandbox.git
! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to 'git://10.0.67.68/android/sandbox.git'
七.解决方式就是修改权限
luther@gliethttp:~$ sudo chmod o+w /vobs/git_repos/android/sandbox.git -R
八.成功推入到android下自己添加的git库
luther@gliethttp:/vobs/works/android-pub/sandbox$ git push
Counting objects: 9, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (7/7), 606 bytes, done.
Total 7 (delta 0), reused 0 (delta 0)
To git://10.0.67.68/android/sandbox.git
f7c2a14..2986a8d master -> master
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
聊天的网友聊的都不会时间太长.因为没有新鲜
【一个门里面加一个文念什么】
钦州三娘湾涨潮时浪有多高?适合冲浪吗?
甜蜜时光甜品烘焙店地址在什么地方,想过去办
植物进行呼吸作用对植物的生命活动有重要意义
我妈妈做手术需要5万元,现在又不够钱,我想
心灰意冷下一句是什么
c++中编写的multimap<int,vector<int>> mm,mm
我的电脑装不上软件。重装系统总是提示文件错
求解决方法:cursor.getString(1);不能返回路
荣事达空气能热水机枣庄总代理地址在哪,我要
蔡邕听琴的译文译文!潜听之 潜主人遽自追而问
阅读理解HOUSTON(Reuters)—HoustontopsaU.S.
广州水疗中心套餐服务都有什么?
我办公室养了潜水艇和三湖慈鲷,请问他们最长
推荐资讯
盲目崇拜既不是信仰,也不是目标,而是一种虚
ME&CITY(滨江道店)地址有知道的么?有点
如果一个健康的人失多少血能晕到
【五道杠什么意思】...摆你一道.这里发道究竟
金色摇篮幼儿园(大岗东路)地址在哪,我要去那
白车,经常洗车好吗
吃康宝莱奶昔大便很油性什么原因
南通公务员考试成绩排名
比亚迪FO、奇瑞QQ、铃木奥拓、哈飞路宝哪款比
我家狗狗有病了不吃东西,怎么才可以补充营养
中国移动(三旺乡)怎么去啊,有知道地址的么
大汉情缘之云中歌的云歌最后嫁给谁
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?