-2

Let's take the following repository. https://github.com/GoogleCloudPlatform/professional-services/tree/master/machine-learning/solutions/energy_price_forecasting

How does one normally clone a repo in their terminal?

I tried the following and both gave errors.

git clone https://github.com/energy_price_forecasting.git
git clone https://github.com/GoogleCloudPlatform/professional-services/tree/master/machine-learning/solutions/energy_price_forecasting.git

forecasting.git
Cloning into 'energy_price_forecasting'...
remote: Not Found
fatal: repository 'https://github.com/energy_price_forecasting.git/' not found

Cloning into 'energy_price_forecasting'...
fatal: repository 'https://github.com/GoogleCloudPlatform/professional-services/tree/master/machine-learning/solutions/energy_price_forecasting.git/'
not found

recnac
  • 3,744
  • 6
  • 24
  • 46
ATMA
  • 1,450
  • 4
  • 23
  • 33
  • Click on the repository in the title of the page. Click on the big green button at the top right labelled "Clone or Download". Copy the command. Paste it in your terminal. – JB Nizet Jul 30 '18 at 15:39
  • Possible duplicate of [How do you clone a Git repository into a specific folder?](https://stackoverflow.com/questions/651038/how-do-you-clone-a-git-repository-into-a-specific-folder) – Liam Jul 30 '18 at 15:45

1 Answers1

2

Just clone the actual repository instead of trying to clone part of the repository

git clone https://github.com/GoogleCloudPlatform/professional-services.git

You can't clone a single file/folder using git. Your only other option would be to look into downloading individual files from git if you only want certain parts of the repo- but that is not the same as cloning.

chevybow
  • 9,959
  • 6
  • 24
  • 39