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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:46:08+00:00 2026-05-10T22:46:08+00:00

I have a local Git repository I’ve been developing under for a few days:

  • 0

I have a local Git repository I’ve been developing under for a few days: it has eighteen commits so far. Tonight, I created a private Github repository I was hoping to push it to; however, when I did so, it only ended up pushing eight of the eighteen commits to Github. I deleted the Github repo and retried, with the same result.

Any thoughts on why this might be happening? I’ve done this procedure before without a few times successfully, so I’m a bit stumped.

Update: There is, and has always been, only the master branch in this repo. Just to address a few of the posted answers…

  • 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. 2026-05-10T22:46:09+00:00Added an answer on May 10, 2026 at 10:46 pm

    I took a look at the repository in question and here’s what was going on:

    • At some point, rpj had performed git checkout [commit id]. This pointed HEAD at a loose commit rather than a recognized branch. I believe this is the ‘dangling HEAD’ problem that CesarB is referring to.
    • Not realizing this problem, he went on making changing and committing them, which bumped HEAD up every time. However, HEAD was just pointing at a dangling chain of commits, not at a recognized branch.
    • When he went to push his changes, git pushed everything up to the top of master, which was only about halfway through the current tree he was on.
    • Confusion ensued

    This diagram should make it more clear:

                     -- D -- E -- F                 /             ^    A -- B -- C -              |    ^         ^               HEAD    |         |  remote    master 

    When he tried to push his changes, only A through C were pushed and remote moved up to C. He couldn’t get commits D through F to push because they aren’t referenced by a known branch.

    Here’s what you see when you’re in this state:

    $ git branch * (no branch) master 

    The solution is to move master up to F in the dangling chain of commits. Here’s how I did it.

    • Create a legitimate branch for the current state:

      git checkout -b tmp

      • The tmp branch is now pointing at commit F in the diagram above
    • Fast-forward master to tmp

      git checkout master

      git merge tmp

      • master is now pointing at commit F.
    • Throw away your temporary branch

      git branch -d tmp

    • You can happily push to the remote repository and it should send all of your changes.

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

Sidebar

Ask A Question

Stats

  • Questions 130k
  • Answers 130k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer First, you'll need to split that string up. Here's a… May 12, 2026 at 6:01 am
  • Editorial Team
    Editorial Team added an answer I had the same symptoms, and the solution was to… May 12, 2026 at 6:01 am
  • Editorial Team
    Editorial Team added an answer Pass a StringBuilder object instead of a string: [DllImport("slpapi62", EntryPoint… May 12, 2026 at 6:01 am

Related Questions

I have a local Git repository I've been developing under for a few days:
I have a local git repository which tracks a remote SVN repository via git
I have a local git repository created with git svn clone . I make
I have a remote gitosis server and a local git repository, and each time
Here's the scenario: I have a local git repository that mirrors the contents of

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.