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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:09:52+00:00 2026-06-15T09:09:52+00:00

I commit ted some code and push ed it to my github account.Then ,I

  • 0

I committed some code and pushed it to my github account.Then ,I modified the code on my machine.I did not add it to the index or commit it.Now I want to remove all those modifications and make the code on my machine the same as what I committed earlier..I am somewhat confused by the various commands -like pull,reset head etc.. (My github account contains only my code ..nobody else pushes to it)

Can someone please advise me what to do here?

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

    The easiest way to throw away uncommitted work is:

    git reset --hard HEAD
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have solved some merge conflicts, committed then tried to Push my changes and
so I committed some code today for the first time to github. however, when
A few minutes ago, I commited some files and then pushed them to my
Earlier on, I committed some code which at the time seemed like a good
I pushed my local repository to GitHub. In the process of committing my code,
A colleague committed (C1) a bunch of new code to github, and I made
Recently I took a look at some code I'd committed to our version control
I lost some code after running git reset --hard HEAD and I never committed
I committed some bad code changes to my SVN sever using TortoiseSVN . Now
I accidentally committed some large test wav files into my repository and they are

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.