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 🙏

© 2026 – Pkg Stats / Ryan Hefner

git-branch-notes

v1.3.0

Published

A CLI tool to help you to manage Git branch notes with remote synchronization

Readme

Git Branch Notes

Read this in other languages: Chinese.

Welcome to Git Branch Notes! A CLI tool for managing Git branch notes with file-based storage.

npm package location

license

Installation

npm install -g git-branch-notes

Note Storage Mechanism

Git Branch Notes now uses a file-based storage system. Branch notes are stored in a JSON file located at branch-notes.json in the root of your repository. This approach ensures that notes remain associated with branch names rather than commit hashes, making them persistent even when branches are updated with new commits.

Since the file is stored in the project root directory (not in .git/), it can be easily shared with team members through Git commits and pushes. This enables seamless collaboration on branch notes across your team.

The file structure looks like this:

{
  "version": "1.0.0",
  "notes": [
    {
      "branchName": "main",
      "note": "This is the main branch",
      "timestamp": "2023-09-15T12:34:56.789Z"
    }
  ],
  "lastUpdated": "2023-09-15T12:34:56.789Z"
}

How to use

Initialize branches with empty notes

git-bn init [-r|-l|-a]

This command initializes notes for branches. By default, it initializes remote branches.

Options:

  • -r, --remote: Initialize only remote branches (default)
  • -l, --local: Initialize only local branches
  • -a, --all: Initialize all branches (local and remote)

List branches with notes

git-bn list [-r|-l|-a]

This command lists branches with notes from the local branch-notes.json file only. It includes enhanced error handling and prompts.

Options:

List only remote branches with notes

git-bn list -r
git-bn list --remote

List only local branches with notes

git-bn list -l
git-bn list --local

Set note for a branch

git-bn set "Working on new feature" ## set note for current branch
git-bn set -b feature-branch "Working on new feature"
git-bn set --branch feature-branch "Working on new feature"

This command automatically checks if the branch exists and adds it to the notes file if it doesn't exist.

Get note for a specific branch

git-bn get ## get note for current branch
git-bn get main

Push notes file to remote repository

git-bn push
git-bn push -m "Update branch notes" ## Push with custom commit message

Push the branch-notes.json file to the remote repository. You can provide a custom commit message with the -m option.

Pull notes file from remote repository

git-bn pull

Pull the latest branch-notes.json file from the remote repository.

View notes mapping

git-bn mapping

Shows a detailed mapping of all branch notes, including deleted branches with their status marked as "[DELETED]".

Automatic Branch Status Management

The tool automatically manages branch status changes:

  • New branches: When a new branch is created (local or remote), it will be automatically added to the branch-notes.json file with an empty note the next time you run git-bn list.
  • Deleted branches: When a branch is deleted, it will be marked as "[DELETED]" in the mapping view but will not be removed from the file.

This ensures that your branch notes are always up-to-date with your repository structure.

Features

  • 📝 Add notes to Git branches
  • 💾 File-based storage in branch-notes.json
  • 🔗 Notes persistently associated with branch names
  • ⏱️ Automatic timestamp tracking for notes
  • 🎯 Simple and intuitive CLI interface

Example

Example