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 trialMarcos Cabrini Riani dos Reis
12,253 Pointsgit checkout Stage1Video4
Error when running git checkout Stage1Video4
error: pathspec 'Stage1Video4' did not match any file(s) known to git.
2 Answers
Ari Misha
19,323 PointsYou're prolly getting this error coz you don't have the branch created with the given name of Stage1Video4 in your local repo. You should run this command instead:
git checkout -b Stage1Video4
Where - b flag instructs the git to create the branch if not created before.
~ Ari
Marcos Cabrini Riani dos Reis
12,253 PointsI went to https://github.com/hdngr/treehouse-gulp-basics clicked in clone or download then download zip. After download I opened the files using my text editor, then I came to the terminal when I type git checkout Stage1Video4 the error occurred.
Ari Misha
19,323 PointsAlright! If you downloaded the zip folder, you probably have to initialize git for the project and create everything from the scratch. However, if you clone the project and fetched the data, you should be in the same directory as your .git folder in order to perform any git related commands.
Marcos Cabrini Riani dos Reis
12,253 PointsMarcos Cabrini Riani dos Reis
12,253 PointsI've just cloned the files from the GitHub website, I thought it should have all the branches in it.
Ari Misha
19,323 PointsAri Misha
19,323 PointsAre you sure you're in the same directory level as the .git folder? (: