git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* submodules
@ 2013-05-03 13:45 shawn wilson
  2013-05-03 19:51 ` submodules Jens Lehmann
  0 siblings, 1 reply; 23+ messages in thread
From: shawn wilson @ 2013-05-03 13:45 UTC (permalink / raw)
  To: Git List

[-- Attachment #1: Type: text/plain, Size: 957 bytes --]

So, I actually have another question I wasn't able to get to in this
example (which has color - sorry - less -F displays it decently)

What is shown here is that trying to add submodules in this repo
doesn't add the .gitmodules file - I can do it manually, but why isn't
it adding the file? There's a .git/modules directory populated with
the right stuff, but no .gitmodules file.

The initial question I was trying to demonstrate was that I've got a
repo with submodules. When I push branches to most of the modules, a:
git branch -r shows them for everyone. However, in one repo/module (I
think it's a repo created with git --bare --shared) no one else can
see (or pull) the remote branches and if I make a new clone of that
repo as myself, I can't see them either. However, those branches are
there and if I check that repo out on its own (not as a submodule of
the main repo) I and everyone else can see those remote branches.

This is git 1.8.2.1 btw.

[-- Attachment #2: typescript --]
[-- Type: application/octet-stream, Size: 51608 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread
* submodules
@ 2014-01-23  8:38 shawn wilson
  2014-01-23 17:20 ` submodules W. Trevor King
  0 siblings, 1 reply; 23+ messages in thread
From: shawn wilson @ 2014-01-23  8:38 UTC (permalink / raw)
  To: Git List

I've got a git repo that just contains a bunch of small projects
(scripts, configs, etc). The idea was (is) to make it so that each
project is tracked seperately (different branches, not needing to
filter out logs for unrelated commits). And it works great for that.
The problem is that I guess I don't know how to manage it and keep
stumbling and tripping over myself here.

My issue is in trying to update the submodules, I'm getting:
 % git submodule update --init
                                                gits/kt (master ⚡)
swlap1
fatal: reference is not a tree: 98f1e9f99fca32ab3de901219eb2f600d38ab3a5
Unable to checkout '98f1e9f99fca32ab3de901219eb2f600d38ab3a5' in
submodule path 'repo_a'

Ok, so a bit of googling and I found this:
http://stackoverflow.com/questions/13425298/git-submodule-update-fatal-error-reference-is-not-a-tree
Ok, so update the repo that contains the submodules every time you
push from a sub repo? How / where do I create a hook to do this?

And then:
http://stackoverflow.com/questions/2155887/git-submodule-head-reference-is-not-a-tree-error
So, the first example didn't really work:
 % cd repo_a
                                            gits/kt (master ⚡) swlap1
 % git checkout 98f1e9
                                              kt/repo_a (master)
swlap1
error: pathspec '98f1e9' did not match any file(s) known to git.

So, at this point I realized I have pushed from two repos (maybe
others have as well) and not updated the repo of submodules. So, as
long as the issue is just with this one repo, I'm ok with loosing a
little data (not much has changed in a while and maybe I'll go and
find the blobs and merge them back in later). So I try the other
method:
 % git log --oneline -p -- repo_a
                                            gits/kt (master ⚡) swlap1
7911a1e Bump.
diff --git a/repo_a b/repo_a
index 206635e..98f1e9f 160000
--- a/repo_a
+++ b/repo_a
@@ -1 +1 @@
-Subproject commit 206635eed8b94e4133a7689b34a570e2fb0b6069
.......
 % git checkout d92f592- -- repo_a
                                            gits/kt (master ⚡) swlap1
fatal: invalid reference: d92f592-



So, (after this is solved) is there a post hook (not even sure where
such a thing would go) after pushing from a submodule repo (maybe a
concatination of commit messages or something) so that this stays in
sync and I never have to think about this again (though I think I'll
remember after winning this fight).

^ permalink raw reply related	[flat|nested] 23+ messages in thread
* Submodules
@ 2007-08-07 22:37 Dmitry Kakurin
  2007-08-07 22:49 ` Submodules Johannes Schindelin
  2007-08-07 22:50 ` Submodules Johannes Schindelin
  0 siblings, 2 replies; 23+ messages in thread
From: Dmitry Kakurin @ 2007-08-07 22:37 UTC (permalink / raw)
  To: git

Where can I find more information about submodules?
I'm interested in both internal implementation details and how to use them.

- Dmitry

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2014-01-23 17:20 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-03 13:45 submodules shawn wilson
2013-05-03 19:51 ` submodules Jens Lehmann
  -- strict thread matches above, loose matches on Subject: below --
2014-01-23  8:38 submodules shawn wilson
2014-01-23 17:20 ` submodules W. Trevor King
2007-08-07 22:37 Submodules Dmitry Kakurin
2007-08-07 22:49 ` Submodules Johannes Schindelin
2007-08-07 23:10   ` Submodules Dmitry Kakurin
2007-08-08 10:27     ` Submodules Sven Verdoolaege
2007-08-07 22:50 ` Submodules Johannes Schindelin
2007-08-07 23:31   ` Submodules Dmitry Kakurin
2007-08-08  0:07     ` Submodules Johannes Schindelin
2007-08-08 10:41     ` Submodules Sven Verdoolaege
2007-08-08 19:33       ` Submodules Junio C Hamano
2007-08-08 19:40         ` Submodules Johannes Schindelin
2007-08-08 19:59           ` Submodules Junio C Hamano
2007-08-08 20:08             ` Submodules Sven Verdoolaege
2007-08-08 22:08               ` Submodules Junio C Hamano
2007-08-08 22:18                 ` Submodules Johannes Schindelin
2007-08-08 20:27             ` Submodules Junio C Hamano
2007-08-08 20:47           ` Submodules Andy Parkins
2007-08-08 21:12             ` Submodules Johannes Schindelin
2007-08-09  5:44               ` Submodules Sven Verdoolaege
2007-08-08 19:53         ` Submodules Sven Verdoolaege

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).