hi, i saw several "is there any step by step howto on how to use git submodules?" question on irc, and as far as i think there is none available at the moment here is how i use it at the moment: $ mkdir lib $ cd lib $ git init Initialized empty Git repository in .git/ $ echo "libmakefile" > Makefile $ dg add Makefile $ git commit -m "libmakefile" Created initial commit 57c1dce: libmakefile 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 Makefile $ cd .. $ mkdir main $ cd main $ git init Initialized empty Git repository in .git/ $ echo "main makefile" > Makefile $ git add Makefile $ git commit -m "main makefile" Created initial commit 8935291: main makefile 1 files changed, 1 insertions(+), 0 deletions(-) create mode 100644 Makefile $ git submodule add ../lib lib Initialized empty Git repository in /home/vmiklos/scm/git/sub/main/lib/.git/ 0 blocks $ git commit -m "added lib submodule" Created commit 9dbfedf: added lib submodule 2 files changed, 4 insertions(+), 0 deletions(-) create mode 100644 .gitmodules create mode 160000 lib $ cd .. $ git clone main cloned Initialized empty Git repository in /home/vmiklos/scm/git/sub/cloned/.git/ 0 blocks $ cd cloned $ git submodule init Submodule 'lib' (/home/vmiklos/scm/git/sub/lib/.git) registered for path 'lib' $ git submodule update Initialized empty Git repository in /home/vmiklos/scm/git/sub/cloned/lib/.git/ 0 blocks Submodule path 'lib': checked out '57c1dce0e083e9ee50d06111d6aa1523116c2e15' $ cat Makefile main makefile $ cat lib/Makefile libmakefile my questions: 1) is this correct? :) i use it and it seem to do what i except, but maybe it's not correct 2) does this worth adding to the documentation? maybe to a .txt under Documentation/howto? or to git-submodule.txt? thanks, - VMiklos
| Fred . | Please add ZFS support (from GPL sources) |
| Davide Libenzi | Re: [patch 7/8] fdmap v2 - implement sys_socket2 |
| Dave Airlie | Re: 2.6.20-mm2 |
| David Miller | [GIT]: Networking |
git: | |
| Sebastian Schuberth | git on Cygwin: Not a valid object name HEAD |
| Linus Torvalds | Re: cleaner/better zlib sources? |
| Johannes Schindelin | Re: [RFC] Git User's Survey 2008 |
| Pierre Habouzit | Making parse-opt incremental, reworked series |
| patrick keshishian | SMTP flood + spamdb |
| GVG GVG | ssh_exchange_identification: Connection closed by remote host |
| Chris Bullock | OpenBSD isakmpd and pf vs Cisco PIX or ASA |
| Alexey Suslikov | OT: OpenBSD on Asus eeePC |
| Larry McVoy | Re: tcp bw in 2.6 |
| Templin, Fred L | [PATCH 03/05] ipv6: RFC4214 Support (5) |
| Alan Cox | Re: [PATCH] Add IPv6 support to TCP SYN cookies |
| David Miller | Re: 2.6.25-rc8: FTP transfer errors |
| Linux Bootup hangs after adding RealTime Premption and HR-Timer | 1 hour ago | Linux kernel |
| SATA 2 size problems | 2 hours ago | Windows |
| problem with 2.6 kernel driver for a USB MAG Stripe Reader as HID device. | 15 hours ago | Linux kernel |
| get_user_pages failure | 16 hours ago | Linux kernel |
| Reading linux kernel | 17 hours ago | Linux kernel |
| High level of Seagate 2.5" SATA drives failing | 23 hours ago | Hardware |
| Resetting the bios password for Toshiba Laptop | 1 day ago | Hardware |
| Linux 2.6.22 slowly RUNS OUT OF LOWMEM | 1 day ago | Linux kernel |
| Questions about modules | 1 day ago | Linux kernel |
| KDB | 2 days ago | Linux kernel |
