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 πŸ™

Β© 2024 – Pkg Stats / Ryan Hefner

git-stack-cli

v1.3.3

Published

- ✨ **[Stacked diffs](https://graphite.dev/guides/stacked-diffs) for `git`** - πŸš€ **Simple one-branch workflow** - 🎯 **Interactively select commits for each pull request** - πŸ’¬ **Group commits for focused code review** - 🌐 **Use the [official GitHub CLI

Downloads

47

Readme

git-stack-cli

  • ✨ Stacked diffs for git
  • πŸš€ Simple one-branch workflow
  • 🎯 Interactively select commits for each pull request
  • πŸ’¬ Group commits for focused code review
  • 🌐 Use the official GitHub CLI
  • ♻️ Automatically synchronize each pull request in the stack
  • πŸ’ͺ Work seamlessly with GitHub's interface
  • 🚫 Avoid juggling mutiple branches and complex rebasing
  • πŸ“š Preserve your detailed commit history
  • ⚑ Faster, in-memory rebase via git revise

Demo

Install

[!TIP]

Install via Homebrew to ensure the official Github CLI and git revise dependencies are installed automatically

brew tap magus/git-stack
brew install git-stack

npm

Installing via npm requires installing the official Github CLI and git revise dependencies separarely

brew install gh
brew install git-revise

npm i -g git-stack-cli

Usage

git stack             # group and sync commits in branch to Github

git stack --check     # print status only, skipping rebase and sync to Github
git stack --verbose   # print more detailed logs for debugging internals
git stack --no-verify # skip git hooks such as pre-commit and pre-push

git stack help        # print a table of all CLI arguments

Why?

The goal of git stack is to combine the simplicity of developing in a single branch in order to preserve your commit history while also grouping commits into pull requests for code review.

Often pushing all your commits to a single pull request is the simplest and fastest approach to development. This comes at a price, your teammates have to review larger, less related pieces of code and you will lose some of your atomic commit history if you "Squash and merge".

When you decide to break changes up into multiple diffs that depend on one another this process is commonly referred to as stacked diffs (pull requests that depend on other pull requests). This approach is popular at many major companies such as Twitter, Facebook, etc. Managing stacked diffs manually involves managing multiple local branches, jumping between them, rebasing, etc. This process gets even more complicated when you start getting feedback in code review and have to update individual branches. Managing even a few stacked diffs requires a relatively strong knowledge of git, even with tricks like --update-refs.

How is this different than x

ghstack

  • git stack automatically synchronizes each pull request in your stack, as needed
  • git stack does not create local branches (instead it annotates commits locally with metadata to denote groups of commits, e.g. git-stack-id: E63ytp5dj)
  • ghstack requires rebasing and squashing since each commit creates a pull request, which means you lose commit history
  • git stack allows developing in a single local branch and selecting groups of commits for each pull request
  • git stack adds a clear comment to each pull request in the stack showing the entire stack
  • git stack does not break if you land pull requests through Github directly, ghstack requires landing from the CLI interface
  • git stack uses the official GitHub CLI (gh) instead of personal access tokens

Development

git submodule update --init --recursive
npm i
npm run dev
npm unlink git-stack-cli
npm link

# navigate to project to test within
npm unlink git-stack-cli
npm link git-stack-cli

git stack --verbose

Build standalone executable

npm run build:standalone

Publishing

[!IMPORTANT]

You must update the version in package.json before running npm run release

npm run release

# release individually
npm run release:npm
npm run release:github
npm run release:brew