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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:55:24+00:00 2026-06-17T15:55:24+00:00

I have pushed some files by mistake and it shows different heads in main

  • 0

I have pushed some files by mistake and it shows different heads in main repository. How can I delete that head?

  • 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-17T15:55:25+00:00Added an answer on June 17, 2026 at 3:55 pm

    I don’t think that you actually want to delete the heads. If you do that, you will lose the work that was done in those branches.

    You probably want to merge the heads back into one branch.

    Say that you have a tree like this:

    o  4 : Head 1
    |
    o  3 : Another commit
    |  
    | o 2 : Head 2
    | |
    |/
    o  1 : A commit
    |
    o  0 : Initial commit
    

    To get rid of the additional head without losing the work contained within it you would merge the two heads (revisions 2 and 4 in this example) like this:

    hg update 4
    hg merge 2
    hg commit -m "Merge"
    

    That will create another commit which has all the changes in revisions 2, 3 and 4 in a single head like this:

    o     5: Merge
    |\
    o |   4 : Head 1
    | |
    o |   3 : Another commit
    | | 
    | o   2 : Head 2
    | |
    |/
    o     1 : A commit
    |
    o     0 : Initial commit
    

    This is standard procedure when multiple developers work on the same repository.

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

Sidebar

Related Questions

I have done some commits and pushed them into my repository. Then I did
I have some elements pushed on the page via ajax. How can I make
I have a project in eclipse on my laptop that I pushed to Git
I have a script that i use to push files back to my home
I have a code base that some of the developers work on via RDP
I have main repository at github. I have created a fork. I created a
I have some template/starting point code that I reuse across projects. While working on
I accidentally pushed some changes to the main branch which weren't ready, so I
I have an application in which the user can select from local video files.
I have an ASP.Net website that pushes image files to the client. Due to

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.