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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:21:10+00:00 2026-06-12T09:21:10+00:00

Having an issue with git rebase conflict, but only when using 2 remote repos.

  • 0

Having an issue with git rebase conflict, but only when using 2 remote repos. Here’s the workflow:

  1. Do work…
  2. Commit
  3. pull -r staging master

This works fine. If there is a conflict I can resolve it.

Then the problem happens when working with production remote repo. I am the only one pushing to production.

  1. git pull -r production (need to do this before pushing to production for some reason…don’t know why because it should be a fast forward push.)
  2. git push production
  3. git pull -r staging (to update my repo)

Here’s where I get all sorts of merge conflicts on files I haven’t worked on.

The conflict may look like this:

<<<<<<< HEAD
  here's some code...
=======
  more code...
>>>>>>> commit foo

So, here are the questions:

  1. Why do I need to pull from production when I am the only one pushing to it?
  2. Why are there merge conflicts on code that is already committed and I have not changed?
  3. Which commit would I choose? HEAD or commit foo
  4. What is the better process so it doesn’t happen?
  • 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-12T09:21:12+00:00Added an answer on June 12, 2026 at 9:21 am

    That is a direct side-effect of your pull --rebase done for two separate remote repos: you are rebasing existing local commits on top of a remote HEAD you just fetch, making sure to create a new HEAD SHA1 which wouldn’t exist on your second remote repo (prod for instance)

    You can use pull --rebase for commits you have never pushed anywhere, as detailed in “When should I use git pull –rebase?“, when collaborating on the same branch of the same remote repo.

    But when you have 2 remotes repos, you should avoid it after the first push, as illustrated in “When will git pull --rebase get me in to trouble?“.

    Even more details on that topic at “What git branching models actually work?“.

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

Sidebar

Related Questions

Having an issue here that I have tried everything I can think of but
I'm having a bit of a weird issue here, basically, im using hibernate together
I am having a constant issue with one of my git repos. I keep
I am having issue with git pull.I have commited my changes in local repo.
Having an issue with traversing in jQuery.. hopfully an easy one..but I'm banging my
I am having an issue with Git branching. Whenever I make changes to a
I'm having an issue executing jruby from the mingw git bash shell in windows.
Having an issue with postgres.app where its installed, its running, but when I enter
I'm new to using a Git (VCS), but I was able to setup Egit
I am having issue in checking which input has been clicked using unobstructive javascript.

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.