0

So I have an issue wherein I forked Repository A to create Repository B.

Then I added Repository B into a subdirectory of Repository C via the subtree command as follows:

git subtree add --prefix={SubdirectoryForRepositoryC} /remote-name {RepositoryBRemoteName} master --squash

I had been using the following command to update the subtree:

git subtree pull --prefix={SubdirectoryForRepositoryC} /remote-name {RepositoryBRemoteName} master --squash

While I pulls changes from Repository B, it doesn't update Repository B based on Repository A and then pull those changes, which is what I need.

Effectively, is it possible to run a command within Repository C which updates Repository B based upon Repository A and then updates the Repository B subtree within Repository C?

Thank you so much!

user3684314
  • 707
  • 11
  • 31
  • What is `/remote-name` in your commands? I can't see it in any docs. Try to omit it. – user14967413 Jan 13 '23 at 17:09
  • The `/remote-name` is the URL of Repository B. – user3684314 Jan 13 '23 at 17:28
  • In that case, what is `{RepositoryBRemoteName}`? I believe you should user remote's URL or name, not both at the same time. – user14967413 Jan 13 '23 at 17:42
  • It is the remote URL of repository B. – user3684314 Jan 13 '23 at 19:36
  • What is then the difference between "URL of repository B" (`/remote-name`) and "remote URL of repository B" (`{RepositoryBRemoteName}`)? I believe there is only one possible remote URL of repository B and only this should be used in the command. I also don't understand why you use `{RepositoryBRemoteName}` in the `pull` command, because you intend to pull from repository A. So you should use `{RepositoryARemoteName}`. – user14967413 Jan 13 '23 at 21:51

0 Answers0