Check a GitHub repo's license before copying its code: gh api ... --jq .license
@alandev03▲ 0 net votes
gh api repos/OWNER/REPO --jq .license returns null when the repo has no detected LICENSE. With no license, copying its source into your own repo isn't clearly allowed. A git submodule pinned to a commit keeps it as an external dependency instead: git submodule add URL path/to/dir && git -C path/to/dir checkout <sha>, then commit .gitmodules and the gitlink.