npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@andreiled/git-bulk

v1.4.0

Published

Perform operations on git repositories in bulk

Downloads

20

Readme

Perform operations on git repositories in bulk

In the real world, we often work with multiple git repositories in a single project. Changes may span across repositories and multitasking can force us to manage branches across multiple repositories as well. The goal for this project is to make managing changes and branches across multiple repositories easy.

At the moment, it makes assumptions based on my own workspaces: a project single root with many repositories in a src folder. If you want to customize this behavior then you can add a .gitbulkconfig file. See the Configuration section below.

Installation

git-bulk can be installed through npm.

npm install -g @andreiled/git-bulk

Configuration

In the directory or directories where you intend to run git bulk from create a new .gitbulkconfig file in following format:

module.exports = {
    // Either define single root containing all repositories
    "repositoryRoot": "./projects"

    // Or define each repository explicitly
    'repositories': [

        // List multiple repositories using just their absolute paths
        './projects/Project1'

        // Or define additional properties for some or all of the repositories
        {
            name: 'ShortName',
            path: './projects/LongNameProject',
            group: 'front-end' }
    ]
}

Operations git-bulk help <command>

These are the supported operations. It is assumed that git-bulk will be executed from the project root. Most of these commands also support targeting subsets of the repositories as well, which looks like git-bulk status ./src/Repo1 ./src/Repo2 Repo3. Repository names can be specified as directory names or paths. For more information on these commands, run git-bulk help <command>.

git-bulk help

Show the help menu with a list of all possible operations.

git-bulk status

Execute git status on all of the repositories that have any changes, where a change can be modified files, committed files, or being ahead/behind of the tracking branch. Names are color coded as well. Repository names will be green when they have no uncommitted changes and they are ahead of the remote, blue when there are uncommitted changes, and red when they are behind the remote.

git-bulk fetch

Execute a git fetch on each of the git repositories. Each repository name will be printed, along with whether it was successful or not.

git-bulk branch

Execute a git branch -v on each of the git repositories.

git-bulk log

Execute a git log on each of the git repositories. This will use a condensed, custom graph view to display the log for each repo. Optionally pass -n <number> to change the amount of commits displayed, and -A to show all branches at once.

git-bulk reset

Execute a git reset on each git repository. You can pass a -h or --hard switch as well.

git-bulk checkout

Execute a git checkout on each git repository. Passing -b branchName is mandatory. Passing a -u branchName option will also set a tracking branch when creating branches. This will checkout the branch on the target packages, or create it if it does not exist.

git-bulk rebase

Execute a git rebase on each git repository. The rebase will only affect repos with changes, unless the -a flag is given. If the -i flag is given, then rebase will be run in interactive mode. Repo names/paths can also be specified to run rebase on a subset of repos. The -a flag is still required, even when specifying repo names manually that have no changes.

git-bulk exec

Execute an arbitrary shell command specified using the -c argument on each git repository. For example, to create a new feature branch in origin remote using development branch in upstream remote:

  • on Linux and similar systems:
    git bulk exec -c 'git fetch upstream && git push origin upstream/development:refs/heads/feature/%FEATURE_NAME%'
  • on Windows with bash available (e.g. Git Bash):
    git bulk exec -c 'bash -c "git fetch upstream && git push origin upstream/development:refs/heads/feature/%FEATURE_NAME%"'