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

gh-fake-git-history

v1.4.3

Published

A command-line tool to generate your git activity

Downloads

14

Readme

Fake GitHub Commits

A command-line tool to fake your GitHub activity ¯\(ツ)/¯. Forked from https://github.com/artiebits/fake-git-history

This tool was forked by @github/insights so that we can maintain a version of the tool for populating fake commit history for use in integration testing. See docs here for more info.

This tool has been published as an NPM package here https://www.npmjs.com/package/gh-fake-git-history.

How To Use

  1. Make sure you have Git and Node.js installed on your machine.

  2. Create a new repository:

    mkdir my-history
    cd my-history
    touch foo.txt
    git init
  3. From within the my-history directory, generate your commits:

    npx gh-fake-git-history --startDate "2020/09/01" --endDate "2020/09/04"

    It will generate changes to the file for every day within the provided date range. You'll see some output like the following:

    // ♥ npx gh-fake-git-history "2020/09/01" --endDate "2020/09/04"
    ⠋ Generating your GitHub activity
    Adding 15 lines...
    Adding 95 lines...
    Removing 69 lines...
    Adding 36 lines...
    ✔ Generating your GitHub activity
    
    ┌──────────────────────────────────────────────────────────────────────────────────────────────────────┐
    │                                                                                                      │
    │                                 Success! 4 commits have been created.                                 │
    │                                                                                                      │
    └──────────────────────────────────────────────────────────────────────────────────────────────────────┘

    This will result in some git history being generated like the following:

    [16:34:46] (master) my-history
    // ♥ git log
    commit 1faf416ec3ed4d52eb237ac9fbb9f3193e6ca38c (HEAD -> master)
    Author: SophieDeBenedetto <[email protected]>
    Date:   Fri Sep 4 15:30:00 2020 -0400
    
       added 4 lines
    
    commit 7b4c9ca257374b40b7b65c4deb34229b84914a45
    Author: SophieDeBenedetto <[email protected]>
    Date:   Fri Sep 4 11:03:00 2020 -0400
    
       removed 81 lines
    
    commit 99948f84dbee96f914ade739442ce5991507712f
    Author: SophieDeBenedetto <[email protected]>
    Date:   Thu Sep 3 12:20:00 2020 -0400
    
       modified 30 lines
    
    commit 2d0e1a04dfea7ec7f1191f3ad5f898a55a13f2b0
    Author: SophieDeBenedetto <[email protected]>
    Date:   Thu Sep 3 10:16:00 2020 -0400
    
       modified 91 lines
    
    ...
  4. Push the my-history repo to some dummy repo that Insights has set up for the purpose of creating dummy data for integration testing. For example, see this repo that had fake generated git history pushed to it.

Done! Go take a look at your GitHub profile 😉

Customizations

--commitsPerDay

Specify how many commits should be created for every single day. Default is 0,3 which means it will randomly make from 0 to 3 commits a day. Example:

npx fake-git-history --commitsPerDay "0,5"

--workdaysOnly

Use it if you don't want to commit on weekends. Example:

npx fake-git-history --workdaysOnly

--startDate and --endDate

By default, the script generates GitHub commits for every day within the last year. If you want to generate activity for a specific dates, then use these options:

npx fake-git-history --startDate "2020/09/01" --endDate "2020/09/30"

Development

To contribute to this project:

  • Clone down the repo
  • Run npm install
  • Make any changes to src/ files
  • Execute the tool manually via `node ./src/cli.js --startDate "2020/09/01" --endDate "2020/09/04"