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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:11:59+00:00 2026-06-12T23:11:59+00:00

I have accidentally pushed changes from the wrong branch of my development repo to

  • 0

I have accidentally pushed changes from the wrong branch of my development repo to my central repo and then continued to pull these to my released repo.

Using git reset --hard [SHA1] I have returned my released repo to the correct place. I tried doing this to the origin too and now when i go git log in the central repo; i get: fatal:bad default revision 'HEAD'

I would like to know how to sort out the HEAD situation and also how to get back to the point before pushing from my development repo, thanks

  • 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-12T23:12:00+00:00Added an answer on June 12, 2026 at 11:12 pm

    The error is normal when you try git log in a remote repo because they are usually bare repositories. Here is a good explanation.

    Now that you’ve reset --hard the local repo to the correct state, it seems that what you want now is to replicate this state in the remote repo. If so, just force push your branches to the origin.

    git push -f origin <branch-name>
    

    Beware that force pushing may cause problems if some people have already pulled the bad revisions from the remote.

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

Sidebar

Related Questions

I have accidentally pushed a branch to a repo. Is there anyway I could
I just did git pull origin branch accidentally and now I have all these
I accidentally deleted a few files from my local git repo. I have not
We accidentally merged branch XYZ into DEV and pushed it to the origin repo.
I accidentally pushed some changes to the main branch which weren't ready, so I
I accidentally created a branch and pushed it to the origin. I created it
Im using SVN at the moment on Mac for iPhone development,and I have accidentally
Accidentally I forgot to open a new branch and committed my changes to the
I've accidentally pushed a file that I don't have rights to to a publicly
I am using git repository in my project. I have accidentally pushed 2 commits

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.