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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:36:21+00:00 2026-05-28T17:36:21+00:00

I made a mistake, and started making commits to the last tag, which lands

  • 0

I made a mistake, and started making commits “to the last tag”, which lands my commits in “no branch”. They should have been applied at the head of an already existing branch. I have not pushed my changes yet. I’ve found a few other question for when commits are in the wrong branch, but now I have no branch, so I don’t know how to handle this.

Preferably, I would like to erase my mistake entirely, and “move” my changes to the end of the right branch. If I must leave my mistake in the history, I need to merge them in atleast.

  • 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-05-28T17:36:23+00:00Added an answer on May 28, 2026 at 5:36 pm

    You are currently in a detached HEAD state. To resolve that, all you need to do is create a new branch with git branch <branchname> or git checkout -b <branchname>. That will leave you with a local branch you can play with, and even delete when you’re done with it.

    Branches in git are just pointers to commits, so if you create a new branch where you are the new branch will point to your current commit, and then you can merge it or whatnot.

    Your “mistake” need not be erased, you simply created new commits on top of previous ones. You did not modify history or anything like that.

    EDIT: In response to your comment, what you need to do is:

    git branch temp
    git checkout master # or any other branch
    git merge temp
    git branch -d temp
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have made a mistake in one of the commits. Now I want to
Please help me finding where I have made mistake? delimiter // CREATE FUNCTION `count_photos_in_gallery`(`tmp_gallery_id`
I have made this mistake several times, and found myself referencing This Post every
Hi all I have problem with my QML code. I made mistake and I
I have been working with a small project recently which involves Struts 2 and
i made a mistake and i have to split 1 table into 2. i
I made the mistake of modifying my original source after importing it into subversion.
We made the mistake of allowing .csproj.user files to be checked in to TFS
I made a mistake when I created one of my UIViewController objects. When I
I made the mistake of downloading the latest Silverlight runtime so that I could

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.