Skip to main content
Active reading [<http://en.wikipedia.org/wiki/Git_%28software%29>].
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

gitGit submodules are a little bit strange - they're always in "detached head" mode - they don't update to the latest commit on a branch like you might expect.

This does make some sense when you think about it, though. Let's say I create repository foofoo with submodule barbar. I push my changes and tell you to check out commit a7402be from repository foofoo.

Then imagine that someone commits a change to repo barrepository bar before you can make your clone.

When you check out commit a7402be from repo foorepository foo, you expect to get the same code I pushed. That's why submodules don't update until you tell them to explicitly and then make a new commit.

Personally I think submodules are the most confusing part of gitGit. There are lots of places that can explain submodules better than I can. I recommend Pro Git by Scott Chacon.

git submodules are a little bit strange - they're always in "detached head" mode - they don't update to the latest commit on a branch like you might expect.

This does make some sense when you think about it, though. Let's say I create repository foo with submodule bar. I push my changes and tell you to check out commit a7402be from repository foo.

Then imagine that someone commits a change to repo bar before you can make your clone.

When you check out commit a7402be from repo foo, you expect to get the same code I pushed. That's why submodules don't update until you tell them to explicitly and then make a new commit.

Personally I think submodules are the most confusing part of git. There are lots of places that can explain submodules better than I can. I recommend Pro Git by Scott Chacon.

Git submodules are a little bit strange - they're always in "detached head" mode - they don't update to the latest commit on a branch like you might expect.

This does make some sense when you think about it, though. Let's say I create repository foo with submodule bar. I push my changes and tell you to check out commit a7402be from repository foo.

Then imagine that someone commits a change to repository bar before you can make your clone.

When you check out commit a7402be from repository foo, you expect to get the same code I pushed. That's why submodules don't update until you tell them to explicitly and then make a new commit.

Personally I think submodules are the most confusing part of Git. There are lots of places that can explain submodules better than I can. I recommend Pro Git by Scott Chacon.

git submodules are a little bit strange - they're always in "detached head" mode - they don't update to the latest commit on a branch like you might expect.

This does make some sense when you think about it, though. Let's say I create repository foo with submodule bar. I push my changes and tell you to check out commit a7402be from repository foo.

Then imagine that someone commits a change to repo bar before you can make your clone.

When you check out commit a7402be from repo foo, you expect to get the same code I pushed. That's why submodules don't update until you tell them to explicitly and then make a new commit.

Personally I think submodules are the most confusing part of git. There are lots of places that can explain submodules better than I can. I recommend Pro GitPro Git by Scott Chacon.

git submodules are a little bit strange - they're always in "detached head" mode - they don't update to the latest commit on a branch like you might expect.

This does make some sense when you think about it, though. Let's say I create repository foo with submodule bar. I push my changes and tell you to check out commit a7402be from repository foo.

Then imagine that someone commits a change to repo bar before you can make your clone.

When you check out commit a7402be from repo foo, you expect to get the same code I pushed. That's why submodules don't update until you tell them to explicitly and then make a new commit.

Personally I think submodules are the most confusing part of git. There are lots of places that can explain submodules better than I can. I recommend Pro Git by Scott Chacon.

git submodules are a little bit strange - they're always in "detached head" mode - they don't update to the latest commit on a branch like you might expect.

This does make some sense when you think about it, though. Let's say I create repository foo with submodule bar. I push my changes and tell you to check out commit a7402be from repository foo.

Then imagine that someone commits a change to repo bar before you can make your clone.

When you check out commit a7402be from repo foo, you expect to get the same code I pushed. That's why submodules don't update until you tell them to explicitly and then make a new commit.

Personally I think submodules are the most confusing part of git. There are lots of places that can explain submodules better than I can. I recommend Pro Git by Scott Chacon.

Source Link
Neall
  • 27.3k
  • 5
  • 51
  • 48

git submodules are a little bit strange - they're always in "detached head" mode - they don't update to the latest commit on a branch like you might expect.

This does make some sense when you think about it, though. Let's say I create repository foo with submodule bar. I push my changes and tell you to check out commit a7402be from repository foo.

Then imagine that someone commits a change to repo bar before you can make your clone.

When you check out commit a7402be from repo foo, you expect to get the same code I pushed. That's why submodules don't update until you tell them to explicitly and then make a new commit.

Personally I think submodules are the most confusing part of git. There are lots of places that can explain submodules better than I can. I recommend Pro Git by Scott Chacon.