How do I get files from a GitHub repo?

Posted on

Question :

I’m doing a project that will download a Git from GitHub, however, I want the download to be automated to the user. For this, I need to get the name of the files and folders that are in the directory. Is there a file in a repo that contains the directories and files in each Git?

    

Answer :

You can use the link that github has with the project zip.

The format is:

  

link useruser / projectname /archive/master.zip

    

Dynamically downloading the zip for yours for your project via the url mentioned above

https://github.com/contaUtilizador/nomeProjeto/archive/master.zip

You can extract the zip and browse the directories that will already be in your environment.

    

Leave a Reply

Your email address will not be published. Required fields are marked *