Rich-Harris / degit

Straightforward project scaffolding
MIT License
6.95k stars 243 forks source link

Github now has default branch as "main", update behaviour to accomodate? #254

Closed EriKWDev closed 3 years ago

EriKWDev commented 3 years ago

There are more and more GitHub repos whose main branch is called "main" and no-longer "master". Would it perhaps be possible to either a) change the default branch for GitHub-commands to be "main" or b) first try and get master, and, if that fails, instead try and fetch branch main and only after that fail the command.

The current error message we get is ! could not find commit hash for master. The new message could perhaps turn into ! could not find commit hash for neither master nor main.

SwiftWinds commented 3 years ago

As we wait for a response from the maintainers, consider this workaround: https://github.com/Rich-Harris/degit/issues/207#issuecomment-708409213

fregante commented 3 years ago

degit is abandoned. You can use a more up-to-date fork of the tool: https://github.com/tiged/tiged