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 trial

Development Tools

Rails/Git - Getting previous version of Odot

Hey everybody, having a quick question concerning Git (I guess). I did some mistakes while following along the build a todo list app course and now I want to go back to a previous version. Since Jason committed always the changes with git (me too since I followed the course) I thought it might be possible to go back in time and delete/ignore the stuff that I recently did. At least that is what I thought Git would be used for. But after doing the Git basics course I still can't figure out how. Is that possible? Even after database migration etc.? Thanks a lot for any tipps!!

1 Answer

Kang-Kyu Lee
Kang-Kyu Lee
52,045 Points

database should be separately handled. Better change it back (with additional migration, or) using rake db:rollback and rake db:migrate:status before you go back to previous commit.

http://teamtreehouse.com/library/get-acquainted-with-git

when it's committed, you can undo the commit with git reset --hard HEAD^.