惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

罗磊的独立博客
Apple Machine Learning Research
Apple Machine Learning Research
The Cloudflare Blog
WordPress大学
WordPress大学
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 叶小钗
博客园 - 聂微东
阮一峰的网络日志
阮一峰的网络日志
腾讯CDC
博客园 - 三生石上(FineUI控件)
V
V2EX
有赞技术团队
有赞技术团队
V
Visual Studio Blog
小众软件
小众软件
Jina AI
Jina AI
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
量子位
T
Tailwind CSS Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
P
Palo Alto Networks Blog
Cisco Talos Blog
Cisco Talos Blog
I
Intezer
Project Zero
Project Zero
A
Arctic Wolf
P
Privacy International News Feed
V
Vulnerabilities – Threatpost
L
Lohrmann on Cybersecurity
S
Securelist
C
Cybersecurity and Infrastructure Security Agency CISA
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Tor Project blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Security @ Cisco Blogs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Google DeepMind News
Google DeepMind News
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
L
LINUX DO - 热门话题
G
GRAHAM CLULEY
Help Net Security
Help Net Security
N
News | PayPal Newsroom
W
WeLiveSecurity
G
Google Developers Blog
Microsoft Security Blog
Microsoft Security Blog
Engineering at Meta
Engineering at Meta
MongoDB | Blog
MongoDB | Blog
C
Check Point Blog

博客园 - loop

brew 出现 git 错误的问题分析 xcode 编译器在各个arch下面默认宏 parallels无法启动之大乌龙-流水账版 关于结对敏捷开发 android openmax hardware decoder 整合记录 mac上parallel与virtualbox无法共存 VLC plugin加载代码分析 在parallel中安装archlinux + awesome inline 小结 小米盒子试用 keepass管理密码 chrome同步书签cpu占用率过高问题解决 git对svn操作 mac上的ssh proxy客户端 --iSSH个人修改版 终于可以在家更新mplayer了 不要一个人吃饭 在archlinux中安装chrome 关于MP4 fileformat中 duration及timescale相关的几个地方 linux ramdom hung up
git submodule 使用
loop · 2013-06-24 · via 博客园 - loop

欢迎访问我的blog:http://blog.thinkinside.me

最近在跟踪Linphone的Android版本的项目,发现代码同步老出问题。

于是仔细的学习了一下git submodule的使用方法。

参考资料

【1】https://git.wiki.kernel.org/index.php/GitSubmoduleTutorial

【2】https://blogs.atlassian.com/2013/03/git-submodules-workflows-tips/

【3】http://speirs.org/blog/2009/5/11/understanding-git-submodules.html

【4】http://www.vogella.com/articles/Git/article.html#submodules

与svn的external的异同

 相同点:

用来引用外部项目

 不同点:

git submodule引用的是具体的某一次commit,而svn external则是直接链接外部的subversion repository最新的checkin

常用操作

增加submodule

git submodule add

同步submodule

git pull --recurse

git submodule update --recursive

checkin submodule的内容

1  修改submodule并checkin

/*some modification*/

cd submodule_dir

git add .

git commit -m "check in in submodule"

2  checkin修改后的submodule commit id

cd base_dir

git add submodule_dir

git commit -m "check in in base_dir"