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 trialShyam Gupta
7,757 Pointspathspec error in git checkout
I am working on a local repo (created using git init). When I checkout a file using git checkout file_name 8ee751d
I get the error error: pathspec '8ee751d' did not match any file(s) known to git.
I know the file exists in my working directory & was present in the 8ee751d commit as well.
2 Answers
Tim Acker
Front End Web Development Techdegree Graduate 31,247 PointsTry adding a '--' before the filename: git checkout <commit_hash> -- <filename>
Shyam Gupta
7,757 PointsTimothy Acker : Thnak you! It worked..