
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
CLI tool to pull specific slices (folders) from a Git repository to specified directories/repository.
GitSlices is a CLI tool that allows you to pull specific folders from a remote Git repository and place them in your project. It works similarly to how npm install fetches packages, but instead, it fetches only the required folders from a repository.
You can install GitSlices globally or locally.
npm install -g git-slices
This allows you to use git-slices as a command-line tool from anywhere.
npm install git-slices
This will add it as a dependency in your project, and you can run it via npx:
npx git-slices <repo-url> <folder-path> [destination-path]
git-slices <repo-url> <folder-path> [destination-path]
git-slices https://github.com/user/repo.git src/api src/api
This will:
src/api.src/api in your current working directory.If destination-path is not provided, it defaults to the same path as folder-path.
You can define a config.json file specifying multiple folders to pull:
[
{ "path": "src/api", "destination": "src/api" },
{ "path": "src/utils", "destination": "src/shared/utils" }
]
Then run:
git-slices <repo-url> --config config.json
| Option | Description |
|---|---|
<repo-url> | URL of the Git repository to pull from. |
<folder-path> | Path of the folder to pull. |
[destination-path] | Destination path (defaults to folder-path). |
--config <file> | Path to a configuration file for batch pulling. |
To remove the package globally:
npm uninstall -g git-slices
To remove it from a local project:
npm uninstall git-slices
MIT License
Shawan Mandal (github@imshawan.dev)
FAQs
CLI tool to pull specific slices (folders) from a Git repository to specified directories/repository.
We found that git-slices 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.