3

I have the same question posed at

How to maintain a Github fork of a popular project

So, I wish to make a fork of a popular project, make a few minor tweaks, and throughout time I want to keep in sync with the changes going on in the master project.

Except that my popular project that I am working with has a bunch of submodules.

So when I:

(1) add a remote repository called xxx that points to the original master branch of the original project

(2) do a git pull xxx master

It pulls in the master project's files and it reports that there are conflicts. When I do a git status I see:

added by us:    external/binary-reference-assemblies

I see this in .gitmodules, so I understand this is a submodule.

What should I do at this point to ensure that I get the latest files for this submodule, so I can subsequently push everything back to my forked repository?

Thanks.

Community
  • 1
  • 1
Dan
  • 894
  • 9
  • 21

1 Answers1

0

As mentioned in this question, try and do a git submodules update --init just before the merge, in order to add that submodule.

Note that a submodule would by default only display the exact SHA1 it represents, in a detached HEAD way.
A git submodule update --remote would update that reference to the latest commit.
See more at "git submodule update --remote vs git pull".

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250