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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:02:18+00:00 2026-06-12T03:02:18+00:00

Scenario: I make a new branch hack on it commit it push it hack

  • 0

Scenario:

  1. I make a new branch
  2. hack on it
  3. commit it
  4. push it
  5. hack on it some more
  6. commit again
  7. try to push again

Git responds:

Updates were rejected because the tip of your current branch is behind
its remote counterpart. etc.

I’m the only one hacking on this branch – no one else is touching it. The remote branch is actually behind the local branch. I shouldn’t have to pull at all.

(And if I do pull, Git reports conflicts between the two, and forces me to merge the branch into itself)

Why is this (likely) happening? And how can I diagnose/fix it?

To be clear, I’m not branching anywhere, and no one else is working on it:

Remote: Commit A -------- Commit B  

Local:  Commit A -------- Commit B -------- Commit C  

C is a straight continuation of B, no branching involved. But git thinks C is a branch of A:

Remote: Commit A -------- Commit B  

                  ------- Commit C  
                /  
Local:  Commit A -------- Commit B  

It’s not; it’s a straight continuation of B.

  • 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-12T03:02:19+00:00Added an answer on June 12, 2026 at 3:02 am

    You probably did some history rewriting? Your local branch diverged from the one on the server. Run this command to get a better understanding of what happened:

    gitk HEAD @{u}
    

    I would strongly recommend you try to understand where this error is coming from. To fix it, simply run:

    git push -f
    

    The -f makes this a “forced push” and overwrites the branch on the server. That is very dangerous when you are working in team. But
    since you are on your own and sure that your local state is correct
    this should be fine. You risk losing commit history if that is not the case.

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

Sidebar

Related Questions

I'm pretty new to anything but the more basic features of GIT. Here's the
Here's my scenario: I need to make three or four calls to different WCF
Scenario : I'll try to put an analogy with the loan broker example from
Scenario first :- I'm using Entity Framework to do some queries, to build my
I am new to git and I would like to know how to tackle
I made a smaller scenario of my bigger problem. What I try to do
I am new to JavaScript. Here is the scenario; I have an imagebutton that
I have scenario where I will have to make six http calls to my
Using Git with Xcode (4.3) is a real nightmare. Here's a scenario... I want
I am new to jqGrid and I need help with a scenario that 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.