24

In Eclipse I simply right click on a project I am working on choose copy and paste with a new name. I have not found an easy way to do this in intellij as it appears that there are configurations all over the project folder that have to be found and renamed. This is way too much work and time to do by hand. Am I missing something?

JesseBoyd
  • 1,022
  • 1
  • 13
  • 18
  • 2
    Possible duplicate of [How can I clone a whole project in IntelliJ Idea?](https://stackoverflow.com/questions/17034874/how-can-i-clone-a-whole-project-in-intellij-idea) – glytching Feb 02 '18 at 19:34
  • See: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000003910-Copying-a-Project – glytching Feb 02 '18 at 19:34
  • 4
    I think this question is worth keeping because the title is clear, the other ones use clone and may not show up in a search. I followed some of those suggestions but my grails project still had a lot of issues from just copying the folder and renaming it. It also doesn't show up with the new name in intellij open screen. Maybe there is no easy solution and this is a call to intellij to make a better product, especially since they are charging for a yearly license. @glytching I did try those suggestions. – JesseBoyd Feb 02 '18 at 22:03

3 Answers3

28
  1. Right click on the project name then click "Copy"
  2. Right click in the white space under the project files then click "Paste"
  3. IntelliJ will ask you to rename the project and to choose a directory
  4. Click "File" and open the project copy
Iyad Shobaki
  • 289
  • 3
  • 5
  • Worked a treat, thanks! In my case upon opening the copied project I also renamed the .iml file by right clicking on it, then Refactor -> Rename and checking the boxes to update the refs. – B. Bulpett May 02 '21 at 17:19
  • 2
    I think this is talking about copying a module, not a project. there is nowhere in IntelliJ I can "right click on a project name" apart from on the Welcome screen, and there I don't see any copy option appear – Adam Burley Jun 21 '21 at 12:11
  • I am getting errors trying to copy my `laravel/vue.js` project this way. I just go into `User/Phpstorm` dir and copy it manually. – Artur Müller Romanov Aug 20 '21 at 08:06
  • This procedure sounds like what should have worked in a rational universe, but often does not actually work. But since when anything about computers works as it should have? – rapt May 01 '22 at 12:43
  • 1
    To keep the same version control, I had to manually copy over my `.git` folders but otherwise worked great – John Meinken Jun 03 '22 at 14:18
  • 1
    1. This copies the primary module, not the project, and 2. Does not always work. I discovered (painfully) that the only techniques that work is to either copy the sources and rebuild a new project, or copy the entire project and `grep -r` for the project name and replace carefully. Guys, this is 2022, and this is a _fundamental_ function you've apparently left out. – alife Aug 31 '22 at 11:17
  • Worked great, except: 1) as @JohnMeinken stated, had to copy manually `.git` directories (as I had submodules, I needed those `.git`-s as well); 2) also had to rename project after copying: open new project > right click on project root > Refactor > Rename > Rename Project – JohnSmith Jun 29 '23 at 07:21
1

You can save your project as a template and then make a new project from that template.

Senozoid
  • 11
  • 2
-1
  1. Copy the project/module folder in your OS
  2. Open that folder in IntelliJ
  3. Go to project settings and rename the project
Meo
  • 12,020
  • 7
  • 45
  • 52