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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:22:40+00:00 2026-05-31T04:22:40+00:00

Background: We use github for our project and I work on my own fork

  • 0

Background: We use github for our project and I work on my own fork of our main repository. We use rebase instead of merge to avoid large merge commits.

Scenario: The way I want to work is like this:

  1. When implementing a new feature, create a local branch of my fork’s master and put in my changes there. I and others in the group make many small commits, so there will almost always be multiple commits that affect the same file on the branch.
  2. Push the local branch to my fork so I have a remote copy of what I am working on (I don’t want to have all my changes lost if my laptop dies or is lost. I try to do this at the end of each day).
  3. If it takes a long time to finish the feature, I occasionally rebase on my fork’s master to make sure that there has been no changes that could break my feature. This usually works ok.
  4. To keep the remote copy of the branch up to date, I push my local branch to that after the rebase.

Problem: Step 4 is where I get the problems. I almost always have to deal with non-fast-forwarded commits and use git push –force.

I’ve looked at

Git: how to maintain permanent parallel branches

How to maintain (mostly) parallel branches with only a few difference

and haven’t found a way to make my workflow work. Doing a google search on git workflows mostly returns results that assume that you all work on local branches and don’t keep a remote copy on github (e.g. http://nvie.com/posts/a-successful-git-branching-model/).

I’m relatively new to Git, so I’d like to know if I am missing something here. I’d like to be able to do step 4 without a –force. An alternate workflow that still allows me to use rebase instead of merge and keep a remote copy of my local branch would also be very useful.

  • 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-31T04:22:41+00:00Added an answer on May 31, 2026 at 4:22 am

    git push --force is a fact of life when dealing with rebase and remote branches, because git push won’t do a non-fast-forward push without it. Most things in git assume that history is only appended to, never edited, and rebase breaks that assumption, so you have to do some pretty wonky things to make it work.

    We used to use a rebase workflow very similar to the one you describe, but eventually switched back to a merge workflow after a while. Rebasing gives you a nice, pretty, linear history, but has many drawbacks, such as requiring --force, losing the ability to see the state of a branch before you merge in master, et cetera.

    As Amber mentions, rebase makes it very difficult to work with other people on the same branch — before git push --forceing, you have to look at the status of the remote branch to see if someone else has pushed to it first, and pull --rebase that in, then git push --force. Even this has a race condition – if someone else pushes just before you push --force, their changes will get overwritten by yours.

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

Sidebar

Related Questions

A little background: I use PowerShell on windows xp at work and I set
(background: Why should I use int instead of a byte or short in C#
Background We use a central repository model to coordinate code submissions between all the
I plan to use AQGridView which I found on github, it says: This project
Is it possible/recommended to use background worker threads with the web browser control? I
I have to design a form with an input inside it. I use background
background: trying to use the twitter gem for ruby-on-rails. in routes: map.resources :twitter_sessions map.finalize_twitter_sessions
Coming from a .NET background I'm use to reusing string variables for storage, so
I have a panel with transparent background which i use to draw an image.
Background There are several different debug flags you can use with the Visual Studio

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.