FAQ: How to Backtrack - git reset II

This community-built FAQ covers the “git reset II” exercise from the lesson “How to Backtrack”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Web Development

Learn Git

FAQs on the exercise git reset II

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

Can we go back to any previous commits by just referencing the 7 characters from the SHA?

What’s the difference between git reset HEAD and git reset ?

1 Like

I am stuck in the second step of “exercise git reset II”.

Q. 2) From the terminal, enter the command to reset to a previous commit, using the first 7 characters of one of the past commit SHAs in your Git log.

Thanks in advance.

Is it me or does this exercise not work?

For all who are stuck here.
If you do not see $ appearing, please press q. Then you can reset.

1 Like

Hi, I was also stuck on the second step. I was just typing random things to move on because the “get unstuck: solution” option was not working for me. I’m not sure why this worked, but it did, and I hope it helps anyone else that’s stuck!

  1. git log
  2. q (to reset)
  3. git reset 5c04eef
  4. git log
  5. git reset d640dc3

Hi my friend. Some considerations here

  1. “q” is to exit from log
  2. use git log and git status to see how it cheages. Also you can use “nano” to see how files content changes

Let me know

it works!
let me know

what happened my friend!?

Try typing the 7 SHA code characters each manually rather than copying and pasting them, It worked for me.:blush::blush:

You can use command git log --oneline, it will give better visibility.