progit / progit2

Pro Git 2nd Edition
Other
5.69k stars 1.88k forks source link

Submodules updated in repository reflect as reversions by other developers on a team #1831

Closed s3YwCf2ZbfJG4SHAfjQMAjtsf closed 1 year ago

s3YwCf2ZbfJG4SHAfjQMAjtsf commented 1 year ago

There's no existing/similar bug report.

This report is about a single actionable bug.

This report is about the ProGit book, version 2, English language.

Bug covers book website/pdf

Problem is present in the Pro Git book on the website?

Which version of the book is affected?

I don't know

Describe the bug:

A repository has 1 or more submodules defined in .gitsubmodules. If a submodule's commit ID is updated by one developer Then another another developer pulls from develop, the submodule will show as reversion locally.

The "Unstaged" item needs to be discarded so the new developer can continue with the updated submodule.

Steps to reproduce:

  1. Developer 1 opens repository with submodule
  2. Alter something in the submodule
  3. Commit the changes to the submodule
  4. Commit the changes to the parent repository in Step 1
  5. Developer 2 pulls from Develop
  6. Sees the submodule with the commit Ids reversed. (new commit id is the old one)

Expected behavior:

It shouldn't show the submodule as a change

Screenshots:

No response

Additional context:

No response

Device

No response

Operating system

No response

Browser/application + version

No response

ben commented 1 year ago

It sounds like this is a complaint about how Git behaves, and not how the book is describing that behavior? I'm going to close it for now, feel free to reopen if you disagree.