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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:20:26+00:00 2026-06-18T10:20:26+00:00

Fairly new to GIT and need a little help. Hosting my content on Github.

  • 0

Fairly new to GIT and need a little help.

Hosting my content on Github. Last night I realized I hadn’t pushed my content up to Github in awhile so I opened up the github mac client and did a commit/sync on my project. It said I was 2 commits ahead of the master branch. I was confused…

1st Mistake –
So I did a ” git reset –hard origin/master”, I then synced up with Github.

I open up my laptop the next morning, then open up netbeans and all my work that I did is gone. I’m in panic mode…

So I’m Googling around and find this page which describes how to undo a GIT Reset. I followed that pretty well and reset to the previous commit.
Here is my Git relog:

ce8d01b HEAD@{0}: reset: moving to HEAD@{1}
fcc0db9 HEAD@{1}: commit: front page
ce8d01b HEAD@{2}: reset: moving to origin/master
a6bda3a HEAD@{3}: commit: front page
cde0712 HEAD@{4}: commit: Fixed Front Page Slider
ce8d01b HEAD@{5}: commit: Fixed Company Scrolling.
dd7b163 HEAD@{6}: commit: Work on company product and home page
4cc4274 HEAD@{7}: commit: Added Company Page
1ebed75 HEAD@{8}: commit (initial): initial

After I did git reset HEAD@{1} I opened netbeans and the code still wasn’t there so I thought maybe I did the wrong one. So I did it again but this time went to HEAD@{2}. Which is where I am now.

a6bda3a HEAD@{0}: reset: moving to HEAD@{3}
ce8d01b HEAD@{1}: reset: moving to HEAD@{1}
fcc0db9 HEAD@{2}: commit: front page
ce8d01b HEAD@{3}: reset: moving to origin/master
a6bda3a HEAD@{4}: commit: front page
cde0712 HEAD@{5}: commit: Fixed Front Page Slider
ce8d01b HEAD@{6}: commit: Fixed Company Scrolling.
dd7b163 HEAD@{7}: commit: Work on company product and home page
4cc4274 HEAD@{8}: commit: Added Company Page
1ebed75 HEAD@{9}: commit (initial): initial

But I still can’t see my code. Is there something else I need to do?

Thanks for the help

  • 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-18T10:20:27+00:00Added an answer on June 18, 2026 at 10:20 am

    From your reflog, a

     git reset --hard a6bda3a 
    

    should restore your content as it was before your git reset --hard origin/master.

    Then, if GitHub branch is ahead, I would recommend a:

    git pull --rebase 
    # check everything is still working
    # git add and git commit if needed
    git push
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am fairly new to Git/GitHUB and I hired a programmer to make changes
I fairly new to regular expressions and need some help. I need to filter
I'm fairly new to Git and was hoping someone can help me. We are
I am fairly new to Git and trying my best to find some documentation
I am fairly new to Git, and I am having a problem with doing
I'm fairly new to git... I untracked a file doing: git update-index --assume-unchanged filename
I am fairly new to Git and am curious if anyone sees an issue
I'm fairly new to Git, and have been working with it for only 3
I'm fairly new to Ruby on Rails / Git and had a few questions
This is a new one to me. I'm a fairly experienced user of git,

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.