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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:28:32+00:00 2026-06-11T03:28:32+00:00

I have a little situation here. I rebased a dev branch, and tried to

  • 0

I have a little situation here. I rebased a dev branch, and tried to push it, but it was rejected (non-fast-forward)… Since I don’t know why, I come to you…

What I did:

git checkout dev
git rebase G
# Here, I had to manually merge some files

# Result (in gitk) was :
#       A---B---C remote/dev   A'---B'---C' dev
#      /                      /
# D---E---F------------------G---H remote/master

git push remote dev

Any idea why my push is “non-fast-forward” and thus rejected ?

  • 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-11T03:28:34+00:00Added an answer on June 11, 2026 at 3:28 am

    It’s not fast-forward, because you did a rebase. rebase takes a bunch of commits and creates new commits from them (possibly in a different location in the commit DAG). Please make sure that you understand all the implications of running git rebase before actually doing so. Not being able to fast-forward is one of these implications.

    Rebasing published history is generally considered a bad idea. If you really must rebase your branch and push it, pass the -f flag to git push, or prepend your refspec with a + (git push remote +dev).

    Other people who have cloned your repository and worked an that branch will have to do the same rebase, or you will merge old history the next time you merge from one of your contributors.


    Elaborating on fast-forward:

    From your graph this is easily visible. Fast-forward basically only ever appends commits to history. Each commit is uniquely identified by its commit hash. The commit hash gets computed over the commit contents as well as the history of the commit. This means that commits with different ancestors/parents are going to have a different hash by definition.

    If you take a number of commits and plug them to a different location in the DAG they will describe a different history and will get a new commit hash (commit times were also updated, but that’s not the point here). It’s therefore not possible to fast-forward because it’s not append-only anymore. Additionally you will be unable to access the old commits (without resorting to the reflog) after rebasing and pushing the result.

    Another way to think about this: your push will not append commits to the old (remote/dev) branch, but append the commits elsewhere (commit G).

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

Sidebar

Related Questions

I have seen a similar related post but my situation is a little different
I have a little situation here and in-spite of searching a lot - am
We have a little situation here. We are writing an ini file at install-time
I have a funny little situation on my hands. I have a httpModule on
I have little bit longer question for you - but hope answer will be
Here is situation I have been trying to solve Lets take a Employee table
I know this question could have passed a few times here but I haven't
I have a little problem with AlertDialogs in my application. So here is my
There's a little bit uncommon situation in my app, that is, I have to
I have here a long method that takes a little while to execute. I

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.