Rich-Harris / degit

Straightforward project scaffolding
MIT License
7.06k stars 246 forks source link

Error: ! could not find commit hash for master in Google Colab #248

Closed cironis closed 3 years ago

cironis commented 3 years ago

I'm running the following code on Google Colab:

!npx degit cironis/ep4 -f and I'm getting this error message:

npx: installed 1 in 0.975s
> destination directory is not empty. Using --force, continuing
! could not find commit hash for master

I have used this exact same code with another repository and it worked perfectly. But it does not work with this repository. What am I doing wrong?

cironis commented 3 years ago

https://stackoverflow.com/questions/65135708/could-not-find-commit-hash-for-master-error-when-using-npx-in-google-colab

Got a answer in stackoverflow.

Github has changed its default branch from master to main instead. But degit still use master by default. So, you need to explicitly tell degit to use main

!npx degit cironis/ep4#main -f

This should download it correctly.