switching branches when they use different submodule remotes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was confused earlier today when I switched branches in a repo with libgit2 in a submodule.

I knew that the different branches used different remotes for the submodule -- one remote is older, the other remote has newer development.

  git://github.com/pieter/libgit2.git
  git://repo.or.cz/libgit2.git

so when I switched I deleted the whole libgit2 dir and ran:

  git submodule init
  git submodule update

I was switching to the branch that referenced git://github.com/pieter/libgit2.git and
I was surprised the newer branch was cloned instead.

Looking at the doc for git submodule:

  http://www.kernel.org/pub/software/scm/git/docs/git-submodule.html

it made it clear that executing init does not alter existing information in .git/config so I deleted the reference in ./git/config manually and started over.

Is there a better way to handle this?

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]