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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:51:46+00:00 2026-06-17T00:51:46+00:00

I keep running into problems with git in a common workflow on GitHub. I

  • 0

I keep running into problems with git in a common workflow on GitHub.

  1. I fork a repo
  2. I commit some changes
  3. I make a pull request to upstream repo
  4. Twiddle thumbs while upstream developer sits on my pull request.
  5. Upstream developer makes changes to their repo
  6. They look at your pull request, but because of changes in their tree it will no longer apply cleanly, so they ask you to update your pull request.
  7. I fetch & merge changes from upstream into my repo, resolve conflicts, commit changes
  8. I rebase commits in my pull request to make it neat and tidy.

This is where the problem arises: my pull request now contains all the changes that occurred between steps 2 and 7, including the upstream developer’s own changes. In a recent example this expanded a 10-line pull request to over 12,000 lines.

How should I reapply my original commits onto a later version of the upstream repo without their changes getting into my pull request?

  • 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-17T00:51:48+00:00Added an answer on June 17, 2026 at 12:51 am

    Change this

    7) I fetch & merge changes from upstream into my repo, resolve conflicts, commit changes.

    8) I rebase commits in my pull request to make it neat and tidy.

    to

    I rebase my repo onto upstream, making it neat and tidy.

    We’ll assume you forked the feature branch from upstream/master, and we’ll use a temporary branch to be safe. If things go wrong, just delete the feature-rebase branch and start over.

    git checkout feature
    git checkout -b feature-rebase
    git rebase -i upstream/master
    

    This will replay your commits on top of upstream/master, as if you had forked right now. Once everything looks good, replace the old feature branch with the rebased version.

    git branch -m feature feature-old
    git branch -m feature-rebase feature
    git branch -d feature-old
    git checkout feature
    git push -f origin feature
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on some generative art projects in AS3, and I keep running into
I'm trying to use git-p4 to clone perforce depot. I keep running into a
I am porting an application from QT3 to QT4, and keep running into problems
I keep running into problems the larger my program gets. For instance, I get
I keep running into problems creating a Windows Azure Cloud Service and trying to
I keep running into problems with Unresolved imports in my Django project (in Eclipse
I am trying to implement JQ UIslider - but I keep running into problems,
I keep running into problems with dereferencing, especially when returning values from functions. The
I'm implementing a A* search algorithm but I keep running into problems with the
I'm trying to work through the problems on projecteuler.net but I keep running into

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.