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

  • Home
  • SEARCH
  • 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 880469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:06:13+00:00 2026-05-15T12:06:13+00:00

i use the git workflow as described in this blogpost . In short: everybody

  • 0

i use the git workflow as described in this blogpost.
In short: everybody develops inside his/her own branch, before merging back to master, you rebase your branch to master again to get clean history.

This works.

Now we have a submodule, and because this is an in-house plugin (Rails), we need to change this often. So most of the times i have changes both in the general branch and in the submodule branch.

What is the best way to work with submodules in the workflow as above.

I first try to push my changes to the submodule (git checkout master, git pull, git checkout branch, git rebase master, git checkout master, git merge branch).

Then, when i try to do the same for my root, i always get an error on my plugin (submodule). I have to resolve the error, before doing git rebase --continue. So if try to git mergetool i converts my folder to a file.

After the rebase has ended, i just restore the <folder_name>.orig to overwrite the file <folder_name> and all is well.

But somehow it feels there should be a better way.

In short: when working via checkout-b/rebase/merge – workflow, how do you handle the changed submodules simultaneously?

  • 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-05-15T12:06:13+00:00Added an answer on May 15, 2026 at 12:06 pm

    Whatever workflow you are following with submodules, there is one rule you shouldn’t forget:
    (From the Git tutorial)

    If you want to make a change within a submodule, you should first check out a branch, make your changes, publish the change within the submodule, and then update the superproject to reference the new commit.

    $ git checkout master
    $ echo "adding a line again" >> a.txt
    $ git commit -a -m "Updated the submodule from within the superproject."
    $ git push
    $ cd ..
    $ git add a        # There is a gotcha here.  Read about it below.
    $ git commit -m "Updated submodule a."
    

    So did you commit the new state of your submodule within the parent project before attempting your rebase/merge from said parent project?

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

Sidebar

Related Questions

How often should you use git-gc? The manual page simply says: Users are encouraged
I frequently use git stash and git stash pop to save and restore changes
For personal projects I use Git for SCM, but at work we use TFS.
I want to use git as a local repository against a remote SVN repository.
I want to use git to allow me to work on several features in
I'd like to use git to record all the changes to a file. Is
I'm thinking of asking my students to use git for pair programming. Because student
Use case: A does something on his box and gots stuck. He asks B
I use git for my local work (and love it ever so much), and
I'd like to use git rebase so as to cleanly merge a feature in

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.