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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:16:53+00:00 2026-06-01T09:16:53+00:00

I’m starting to understand git but I’m still having some trouble with the abstraction.

  • 0

I’m starting to understand git but I’m still having some trouble with the abstraction. I checked out a previous version to make some changes with a simple:

git checkout [commit id] 

And I got the message HEAD was moved to a new this new commit id. I made the changes that I needed and added and committed them. However, when I tried pushing the changes to Heroku I got the message that everything was up to date. I knew this couldn’t be the case, so I assumed that I made some alternative branch when I went back to a previous version and committed changes.

So I then tried:

git merge master

Which errored when it tried to auto merge the files that I had been working on. So I cleaned up the conflicts that appeared in the file and added and committed the changes and did:

git merge master

This time however I got the message ‘Already up-to-date.’ When I tried pushing the changes to Heroku, the file was still in the state I left it when I jumped back a few versions. I’m not quite sure how to have the changes I made appear…

  • 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-01T09:16:54+00:00Added an answer on June 1, 2026 at 9:16 am

    You are on a “detached HEAD”. You’re not on any branch, which makes a number of git operations difficult.

    First thing to do is git checkout -b <new branch name>. That way, at least, you’ll have a name by which to refer to your current state.

    Next we have to figure out what you were actually trying to do. You checked out a “previous version to make some changes”? What did you expect to do with those changes? You can’t edit the past. (Well, you can, but it’s highly unusual and you should ignore it for now.) You can add new stuff on top of a branch or you can make a new branch to hold an alternative version of the project.

    In all probability, you should just have made your changes on the tip of master, committed them and then pushed them.

    Or, if you want to make a branch, you should have done git checkout -b <new branch name> <id of commit to form base of new branch>. Then, you could make changes, commit, and push the new branch with something like git push origin <new branch name>. Making a branch would be for releasing a bug fix for an old version of your project. (Actually, depending on your workflow, you maybe should have branched in order to release that previous version and your bug fix would go on top of that pre-existing branch.)

    I fear that the merging that you’ve done has left you in a state that will be difficult to recover from gracefully. If the changes you made were not big, you might just recreate them and toss your current state. Or, if you can find the commit with the changes, you might reset to master and then cherry-pick it. You can use git whatchanged master.. to find that commit.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build

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.