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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:44:39+00:00 2026-05-12T09:44:39+00:00

I have a situation where I will have to rebase a topic branch to

  • 0

I have a situation where I will have to rebase a topic branch to a master. That’s fine, it’s the normal rebase case and works great.

The complication is when I’m trying to get this process to be in sync on a bare remote repository.

e.g.

o--o--o origin/master
       \
        o--o origin/topic

o--o--o clone/master - tracking origin/master
       \
        o--o clone/topic - tracking origin/topic

Now I make a commit to clone/master which I push to origin/master, so far so good.

o--o--o--n origin/master
       \
        o--o origin/topic

o--o--o--n clone/master - tracking origin/master
       \
        o--o clone/topic - tracking origin/topic

This is where I want to end up:

o--o--o--n origin/master
          \
           o--o origin/topic

o--o--o--n clone/master - tracking origin/master
          \
           o--o clone/topic - tracking origin/topic

I just can’t seem to get there, please help.

The workflow is:

  1. Clone the bare remote origin
  2. Make changes to clone/master
  3. Push changes to origin/master
  4. Rebase clone/topic to either origin or clone master – doesn’t seem to make too much difference
  5. Now I want the origin/topic to reflect the rebase so I want to push but first I have to pull to make clone/topic fast forward then I end up a merge which has all the original commits from clone/topic with all the commits from origin/topic on top.
  • 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-12T09:44:39+00:00Added an answer on May 12, 2026 at 9:44 am

    I would modify slightly workflow that you have in order to avoid push –mirror.

    1. git clone /path/to/origin # clones the master
    2. git checkout –track origin/topic
    3. git checkout master
    4. git add some_new_file; git commit -m “added some new file”
    5. git push origin/master
    6. git checkout topic #Local branch
    7. git rebase master
    8. git push origin master #it will update master on origin
    9. git push –force origin/topic : it will update topic on origin

    You need –force because origin/topic will change the ancestor and you have disable fast forward check.

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

Sidebar

Related Questions

I have a unique situation where I'm building a site that will call data
I have a situation where I have several root applications that will reference the
Meaning will it work fine? I have a situation where I am attaching files
I have a situation where I will be using a repository pattern and pulling
I have a challenging situation; we will have programs on Mac, PC, iOS and
Following situation: I have a JFrame and call JOptionPane.showInputDialog(test) . The modal dialog will
I have situation, where running a query that filters by an indexed column in
In a part of my system, I have this situation: I will receive a
The situation will like this .... .... a user have many posts. But if
I have a situation in which my .dmg file will on my removable storage

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.