Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialhuckleberry
14,636 PointsGit Basics Course: Is there a way to reset the console back to the initial state?
I've gotten to a point in the course where I'm getting an error message during the cloning/git push stage. I've tried going back to previous videos and their corresponding consoles but it seems that they all start from where you last left off. Instead of going through and deleting everything manually and starting from scratch, is there a way to reset the console back to the actual start of the course as it first was when you start with stage 1 video 1?
Thanks,
Huck -
2 Answers
Brandon Barrette
20,485 PointsSo you need to find the commit which you want to go back to, and you can switch to it using:
git checkout -b old-state 0d1d7fc32
This will create a new branch called old-state and it will be at the commit 0d1d7fc32
See more here:
http://stackoverflow.com/questions/4114095/revert-to-a-previous-git-commit
Jonathan Grieve
Treehouse Moderator 91,253 PointsThis might sound simplistic but is it not a case of starting back from the appropriate video which would hopefully then change the console for corresponding videos? :-)
huckleberry
14,636 Pointswell that's what I thought but I went back one video at a time and deleted everything in each instance and every time I got back to the point in which the video differs from what my console tells me, they still differ. So... I dunno what's going on or how to fix it. The only thing I didn't do was just delete the initial folder (my_really_cool_project) myself. Guess I could do that though...
Either way though, just for future reference, it would be nice if there was indeed a way to reset a console back to start. It seems like it would be an invaluable tool for those that like to drill things.
Huck -
Jonathan Grieve
Treehouse Moderator 91,253 PointsI think that may be what you'll have to do. I'd like to go back to the Git Basics course at some point. I picked up a lot the course but some concepts went way over my head. I guess for you it's just a case of what you're prepared to sacrifice to get started again. :-)
huckleberry
14,636 Pointshuckleberry
14,636 Pointsahh, thank you! I'll read into that and learn more about it later but as of about 20 min ago I just deleted everything that existed in there and started fresh. No worries though, I like drilling things and it'll only get me more comfy with the git architecture but thanks! I'm sure that'll come in handy later on down the line once I muck up again ;)
Cheers,
Huck -