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 trialEnyang Mercy
Courses Plus Student 2,339 PointsDifficult to copy for clone from github. Error as file can't be found
What next? Can i code manually? or copy from teachers note and paste on my intelliJ?
3 Answers
Enyang Mercy
Courses Plus Student 2,339 PointsDear Livia, I am trying to clone a code on Unit testing in java. Clone it from Github to my PC. The whole process seem pretty difficult bc i'm not familiar with github. So my question is, can i code it from the beginning? Or better still can i have the right directions to follow from Github. Maybe i have an updated version of Github bc the pages are not similar. Thanks
Livia Galeazzi
Java Web Development Techdegree Graduate 21,083 PointsOf course you can code it from the beginning.
If you want help with cloning it please answer those questions:
- Which project are you trying to clone? (Please give a link to the Github project you want to clone)
- For which course is this? (Please give a link to the course)
- What exactly are you doing (where do you click) and what exactly is not working? At which step do you have an error? What is the error message?
At the moment I don't know what is happening so I don't know how to help you. You say the pages are not similar but I don't know which directions you're trying to follow.
There are many ways to copy a github project. You could dowload it as a zip, you could clone it from the command line, you could clone it from your IDE... please tell me exactly what you're doing and exactly what is not working.
Enyang Mercy
Courses Plus Student 2,339 Points1) Java unit testing vennding machine (on java unit test) 2) https://teamtreehouse.com/library/unit-testing-in-java 3) I'm trying to copy the code from Github to my IntelliJ Workspace. -i can't copy the code bc i don't know where to click and copy -Error is ; i can't copy the code. Thanks
Livia Galeazzi
Java Web Development Techdegree Graduate 21,083 PointsOk, I understand. This is what you should do:
- When you go to the Github repository you linked, you should see a green button on the right saying "clone or download". Click on it and you'll see a small window with a link.
- Next to the link, on the right, there should be a small "copy to clipboard" button. Click on it to copy the link to the clipboard
- Open IntelliJ Idea
Now there are two possibilities depending on what you've done with IntelliJ before. Either it will open the last project you were working on, or if there wasn't one, you'll see a small window with four options to create or open a project.
If you see the small window:
- Select the option "Checkout from version control"
- Select "Github"
- Paste the URL you copied into the "Git Repository URL" field
- Click "Clone"
- Click "Yes" to open the project right away The project should open
If a project opens:
- Go to the VCS menu (it's short for "Version Control System")
- Go to "Checkout from version control" > "Github"
- Paste the URL you copied into the "Git Repository URL" field
- Click "Clone"
- Click "Yes" to open the project right away
- IntelliJ will ask you if you want to open the project in this window or a different one, it really doesn't matter either way The project should open
Let me know if one of these steps doesn't work. It's possible that we have slightly different versions of IntelliJ.
Livia Galeazzi
Java Web Development Techdegree Graduate 21,083 PointsLivia Galeazzi
Java Web Development Techdegree Graduate 21,083 PointsWhich project are you trying to clone? What is the error exactly?
Of course you can also create your own project, but if you want to solve the issue you're having with github, please give some more details.