Chinaunix首页 | 论坛 | 博客
  • 博客访问: 160948
  • 博文数量: 31
  • 博客积分: 1720
  • 博客等级: 上尉
  • 技术积分: 305
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-13 13:47
文章分类

全部博文(31)

文章存档

2014年(3)

2013年(1)

2012年(10)

2011年(1)

2010年(3)

2009年(13)

分类: LINUX

2012-10-10 14:26:15

This is to introduce the way to add one subproject with git submodule.

My personal tree is libvirt-ppc.
After pull the tree source code, then cd the directory of libvirt-ppc.
#cd libvirt-ppc
#git submodule add git://git.sv.gnu.org/gnulib.git ./.gnulib
The there is one file called .gitmodules
#cat .gitmodules
[submodule ".gnulib"]
        path = .gnulib
        url = git://git.sv.gnu.org/gnulib.git

Here we need to do one hack of submodule's name.
It is created as .gnulib, the name is the same as path.
We can modify it as gnulib.
#cat .gitmodules
[submodule "gnulib"]
        path = .gnulib
        url = git://git.sv.gnu.org/gnulib.git
#git submodule init
#git add .gitmodule
# git add .gnulib
# git commit -s -a
# git push origin HEAD:refs/heads/ppc-next (push to ppc-next branch)

more information, please refer to:
阅读(2213) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~