skip to Main Content

I was given access to the github repository which is currently completely empty. When I git clone it, I just receive the empty folder, no files. So when I create react app it also creates its folder so I basically have folder inside github repo folder.

what I want is to be able to have all my react files inside the cloned folder. Should I just create react app and move all the files to the github repo folder or what’s the best practice?

Thanks

2

Answers


  1. If that directory is empty, then simply go one level up, and specify that directory as the target of create-react-app

    npx create-react-app <your_dir>
    

    That will create files inside (empty) preexisting directory.

    Login or Signup to reply.
  2. go inside your empty directory and run this

    npx create-react-app .
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search