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 7851923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:17:44+00:00 2026-06-02T19:17:44+00:00

I have two bare repos super and a , one clone of super –

  • 0

I have two bare repos super and a, one clone of super – clone_super and one clone of a – clone_a. I’ve added repo a as a submodule in clone_super.

If I now make some changes in clone_a, push those and do a git pull origin master in ~/clone_super/a, it will render in a modify status for ~/clone_super/a, displayed after git status in ~/clone_super.

If I do git submodule update, ~/clone_super/a will revert to previous commit. So, is it intended that I need to commit and push submodules for repos that they exist in each time I update them?

  • 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-02T19:17:46+00:00Added an answer on June 2, 2026 at 7:17 pm

    The short answer is yes, you must commit and push a submodule after you update it.

    Think of how the directory would work if it wasn’t a submodule, every time you changed a file you would have to commit and push it. A submodule is exactly the same except super does not track the file changes directly. Instead the repository inside the submodule tracks the file changes and the super repository tracks those changes by tracking commits in the submodule.

    The nice thing about this is it allows tracking at different granularity. You can make dozens of tracked changes in the submodule without changing the super repository and then make a single commit to super reflecting the changes in the submodule. The cost is the requirement of committing twice.

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

Sidebar

Related Questions

Have two actionsheet buttons and one modalviewcontroller on mainviewcontroller in application. Now for two
I have a bare repository and two working copies - one on my machine,
I have two classes (MVC view model) which inherits from one abstract base class.
I have two unrelated (not sharing any ancestor check in) Git repositories, one is
I have an assignment, and it has (amongst others) two demands: make an installer
I have a remote bare repository with two branches 'master' and 'testing', where HEAD
Have two folders with approx. 150 java property files. In a shell script, how
I have two tables images2 and image_data So the goal is to have 1
I have two files client.php and server.php. The client file send a HTTP request
I have two columns say Main and Sub . (they can be of same

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.