
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
This is a community driven fork of degit because it isn't being maintained.
tiged makes copies of git repositories. When you run tiged some-user/some-repo
or (for backward compatibility) degit some-user/some-repo
, it will find the latest commit on https://github.com/some-user/some-repo and download the associated tar file to ~/.degit/some-user/some-repo/commithash.tar.gz
if it doesn't already exist locally. (This is much quicker than using git clone
, because you're not downloading the entire git history.)
npm uninstall -g degit
npm install -g tiged
You can use tiged or degit as the command. So no automated scripts break if you swap degit for tiged.
The simplest use of tiged is to download the main branch of a repo from GitHub to the current working directory:
tiged user/repo
# these commands are equivalent
tiged github:user/repo
tiged git@github.com:user/repo
tiged https://github.com/user/repo
Or you can download from GitLab and BitBucket:
# download from GitLab
tiged gitlab:user/repo
tiged git@gitlab.com:user/repo
tiged https://gitlab.com/user/repo
# download from BitBucket
tiged bitbucket:user/repo
tiged git@bitbucket.org:user/repo
tiged https://bitbucket.org/user/repo
# download from Sourcehut
tiged git.sr.ht/user/repo
tiged git@git.sr.ht:user/repo
tiged https://git.sr.ht/user/repo
tiged user/repo#dev # branch
tiged user/repo#v1.2.3 # release tag
tiged user/repo#1234abcd # commit hash
If the second argument is omitted, the repo will be cloned to the current directory.
tiged user/repo my-new-project
Normally tiged caches tar.gz of the repo for future use. This is sometimes unwanted (e.g. scroll down for known bug)
tiged --no-cache user/repo
To clone a specific subdirectory instead of the entire repo, just add it to the argument:
tiged user/repo/subdirectory
To get a GitLab repo that has a subgroup use the --subgroup
option.
tiged --subgroup https://gitlab.com/group-test-repo/subgroup-test-repo/test-repo my-dir
tiged -s https://gitlab.com/group-test-repo/subgroup-test-repo/test-repo my-dir
To get a subdirectory of a repo inside a subgroup, use the --sub-directory
option.
tiged --subgroup https://gitlab.com/group-test-repo/subgroup-test-repo/test-repo --sub-directory subdir1 my-dir
If you have an https_proxy
environment variable, Tiged will use it.
Private repos can be cloned by specifying --mode=git
(the default is tar
). In this mode, Tiged will use git
under the hood. It's much slower than fetching a tarball, which is why it's not the default.
Note: this clones over SSH, not HTTPS.
tiged --help
git clone --depth 1
?A few salient differences:
git clone
, you get a .git
folder that pertains to the project template, rather than your project. You can easily forget to re-init the repository, and end up confusing yourself.tar.gz
file for a specific commit, you don't need to fetch it again).tiged user/repo
instead of git clone --depth 1 git@github.com:user/repo
)You can also use tiged inside a Node script:
const tiged = require('tiged');
const emitter = tiged('user/repo', {
cache: true,
force: true,
verbose: true
});
emitter.on('info', info => {
console.log(info.message);
});
emitter.clone('path/to/dest').then(() => {
console.log('done');
});
You can manipulate repositories after they have been cloned with actions, specified in a degit.json
file that lives at the top level of the working directory. Currently, there are two actions — clone
and remove
. Additional actions may be added in future.
// degit.json
[
{
"action": "clone",
"src": "user/another-repo"
}
]
This will clone user/another-repo
, preserving the contents of the existing working directory. This allows you to, say, add a new README.md or starter file to a repo that you do not control. The cloned repo can contain its own degit.json
actions.
// degit.json
[
{
"action": "remove",
"files": ["LICENSE"]
}
]
Remove a file at the specified path.
zlib: unexpected end of file
: this is solved by using option --no-cache
or clearing the cache folder (rm -rf ~/.degit
); more details in #45degit
was last released over a year ago Feb 5, 2020, and Rich is not answering pull requests or issues there. He is probably very busy with Svelte and we love him for that.Rich has now (April 1, 2021) merged the main branch fix. Regardless currently this fork is still more fully featured and will continue to be developed.main
or other default branch (has been merged!).main
or any default branch automatically. #243--mode=git
with private repos now work on Windows #191.degit --help
now works. Previously it would crash instead of displaying help.md contents. #179--mode=git
is now faster. #171--mode=git
#19MIT.
2.12.1
npm bugged out when publishing. Version 2.12.0 is the same as 2.12.1
FAQs
Straightforward project scaffolding
The npm package tiged receives a total of 4,991 weekly downloads. As such, tiged popularity was classified as popular.
We found that tiged demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.