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

gitf

v0.1.0

Published

git flow

Downloads

12

Readme

gitf

A set of git tools based on A successful Git branching model

Overview

  • Start and finish a feature, release and hotfix branch.
  • Bump the version number.
  • Create a tag for release and hotfix.
  • Remove path from git history.

Good to know

  • Be sure you have a clean tree before running gitf.
  • When started will create the develop branch for you if doesn't exist.
  • Uses the package.json to manage versions, folowing Semantic Versioning.

Install

To install gitf globaly run

npm install gitf -g

or to install localy

npm install gitf --save-dev

How it works

Use gitf in the command line or in node.

CLI

gitf --help

Node

Options
  • path string
  • clearScreen Boolean
  • callback Function
const Gitf = require('gitf')
const gitf = new Gitf({
  path: './',
  clearScreen: true
}, callback)

Create a feature branch

Create a feature branch from develop.

gitf create-feature experiment
Options
  • branchName string
  • callback Function
gitf.run('create-feature' 'experiment', callback)

Finish a feature branch

Merge the feature branch in develop and delete the feature branch.

gitf finish-feature experiment
Options
  • branchName string
  • callback Function
gitf.run('finish-feature' 'experiment', callback)

Create a release branch

Bump version, tag commit and create a release branch from develop.

gitf create-release minor
Options
  • release string minor major
  • callback Function
gitf.run('create-release' 'minor', callback)

Finish a release branch

Bump version and merge the release branch with develop.

gitf finish-release 0.1
Options
  • releaseNumber string
  • callback Function
gitf.run('finish-release' '0.1', callback)

Create a hotfix branch

Create a hotfix branch from a release branch.

gitf create-hotfix 0.1
Options
  • releaseNumber string
  • callback Function
gitf.run('create-hotfix' '0.1', callback)

Finish a hotfix branch

Bump version, tag commit and merge the hotfix branch with release branch.

gitf finish-hotfix 0.1.1
Options
  • hotfixNumber string
  • callback Function
gitf.run('finish-hotfix' '0.1.1', callback)

Remove a path from git history

Remove a path from git history for a specific branch.

gitf remove-path path/to/remove master
Options
  • path string
  • branchName string
  • callback Function
gitf.run('remove-path' 'path/to/remove', 'master', callback)

What happen behind?

Create a feature branch

git checkout -b feature-* develop

Finish a feature branch

git checkout develop
git merge feature-*
git branch -d feature-*

Create a release branch

git checkout develop
git commit -a -m "bumped version number to release-*.*.*-rc.1"
git tag release-*.*.*-rc.1
git checkout -b release-*.* develop

Bump version number in package.json after checkout develop

Finish a release branch

git checkout develop
git merge release-*.*

Create a hotfix branch

git checkout -b hotfix-*.*.* release-*.*

Finish a hotfix branch

git commit -a -m "bumped version number to *.*.*"
git tag *.*.*
git checkout release-*
git merge hotfix-*
git branch -d hotfix-*

Remove a path from git history

git checkout *
git filter-branch --tree-filter 'rm -rf *' --prune-empty HEAD &&
git for-each-ref --format="%(refname)" refs/original/ | xargs -n 1 git update-ref -d &&
git gc

Contributing

Test

The unit test are written in Mocha. Please add a unit test for every new feature or bug fix. npm test will run the tests.

Documentation

Please add documentation for every API change.

Feel free to contribute!

License

Copyright (c) 2017 Bruno Santos Licensed under the MIT license.