I'd imagine there is a 'new project from repo' option somewhere but I can't find it. Is there more to it than this, or am I missing something?
4 Answers
Use the Team menu, select "Git" > "Clone..."
Once the repo has been cloned into a local folder, NetBeans will give you the option to open the project.
Trying to create a project and then clone into it fails because the target folder is not completely empty.

- 1,637
- 1
- 16
- 21
-
1there s no Team > Git > Clone :S i guess it depends on what u select or sth – Orkun Feb 16 '18 at 10:53
-
Close all the projects or "deselect" them going to a "general window" (e.g. Services) and the option will appear – jdevora Jun 07 '18 at 13:24
Just clone the repo into your (newly created) netbeans project and then refresh (build) it.

- 128,817
- 21
- 151
- 173
-
6Could you walk through the steps for that please for those of us who are brand new to Netbeans? – user658182 Jul 06 '13 at 03:33
-
4This way fails with message: "Specified destination already exists and is not an empty directory.". The only working way I use is via command line `git remote add origin {URL}` and if the `origin` already exists I use `git remote rm origin` and then continue adding. – Cleankod Jun 03 '14 at 09:30
Here's what worked for me:
> git clone https://github.com/path/project
Then in NetBeans: File > New Project > choose a project type "...with Existing Sources" > "Next" select "Source Folder" (the folder you cloned into) and press "Finish"
Unfortunately, it seems that your project must already correspond to a project type that NetBeans already supports (eg. Java Application, HTML5/JS Application, etc). If it doesn't you probably won't get this to work.

- 8,075
- 5
- 46
- 66
But if you want to use a local git repository (i.e. a repo that was alredy cloned from the git server e.g. by Eclipse) in Netbeans without cloning it from the server, you have to click on Team --> Git --> Clone and in the input field "Repository URL" type file:///D:/your.local.git.repo/. In the field "Clone into:" you have to specify the destination folder of the cloning.
This will "make a copy" of D:/your.local.git.repo/ into the destination folder.

- 72
- 13