Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8161721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:33:34+00:00 2026-06-06T18:33:34+00:00

In case of a submodule conflict (i.e. when the two commits to merge contain

  • 0

In case of a submodule conflict (i.e. when the two commits to merge contain different changes of the referenced commit), how can I easily set the submodule to “theirs” commit? In case of files, I would perform:

git checkout --theirs <file>

However this does not work for submodules. On a more technical level, what I have is an Index containing the submodule for stages 1, 2 and 3:

$ git ls-files -s module
160000 89b085c4269259fa22632353071e6875f158afde 1       submodule
160000 b9ad3bc8aafdf52a2adf74620afae8934474b82d 2       submodule
160000 1afd42893d18ef5edeeadd67e7c65262505e6004 3       submodule

and what I want is to have the “theirs” version in stage 0:

$ git ls-files -s module
160000 1afd42893d18ef5edeeadd67e7c65262505e6004 0       submodule

Update: false assertion on reference http://fiji.sc/wiki/index.php/Git_submodule_tutorial removed.

Update 2: Index-related example added.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T18:33:38+00:00Added an answer on June 6, 2026 at 6:33 pm

    Your parent repository just refers to the current working version of your submodule repository. The “submodule pointer” always points to the working copy of the submodule.

    So you have to put the submodule repository in the state you want to (in this specific case, by updating it to “theirs” version). After that, the “submodule pointer” will update itself automatically (of course, you’ll have to commit the change).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Simple case of trying to prove I can convert NSString to NSDate . Create
I believe I understand how submodule work, but in my case I don't want
Case is I want to prompt a message (Do you want to save changes?)
CASE: the form contains input text for entering department name (can't be null or
Case: I have a model ( ride_request ) in ride_request there are two fields
In case of conflict, I need to overwrite the values in the database with
Case in point. I want to know if some set of files have as
Case: public class customer { public string Adress { get; set; } } Xaml:
Case: A system for small groups and clubs is to be set up online.
Case in point : I've got a handle to a window (for instance, using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.