Giter VIP home page Giter VIP logo

fake-commits's Introduction

fake-commits

This script creates fake commits. It can be used to e.g. confuse GitHub’s Contribution Calendar, which is a privacy issue and cannot be hidden (1, 2) or just impress your (rather naive) employer with your 10.000 commits a day.

Usage strategies

I can imagine at least two strategies:

  1. swamp your stats with ~100 commits per day for a number of years in a public repo to mask your real commits;
    • it looks like the GitHub calendar may not swallow this…
  2. fill up your gaps (e.g. holidays that you don’t want to show to the whole world) with a ‘normal’ number of commits in a private repo and share anonymised commits with the world by:
    1. going to your profile page;
    2. selecting Contribution settings just above your Contributions calendar;
    3. ticking Private contributions.

Setup your repo

In order to create fake commits we need some changes to commit, and for that we need (in this case) two files. Make them as small as possible and non-identical, call them file1 and file2 and add them to your fake repo:

mkdir fake-repo && cd fake-repo
git init

echo 1 > file1
echo 2 > file2
git add file1 file2

The changes between commits will consist of swapping the two files (which is why they shan’t be identical).

Then download fake-commits.py into your directory and make it executable.

Usage syntax

# Get some help:
./fake-commits.py -h

# You went on holiday for a week and want to fill the gap with a moderate number of commits:
./fake-commits.py -v -f 2001-03-10 -l 2001-03-17 -n 0.2  -P   # See what would happen
./fake-commits.py -vv -f 2001-03-10 -l 2001-03-17 -n 0.2  -P  # See what would happen in more detail
./fake-commits.py -v -f 2001-03-10 -l 2001-03-17 -n 0.2       # Actually create the commits

# If you think you should have committed more:
./fake-commits.py -v -f 2001-03-10 -l 2001-03-17 -n 1  -P  # See what would happen

# If you're a maniac:
./fake-commits.py -v -f 2001-03-10 -l 2001-03-17 -n 100  -P  # See what would happen

# If you're a maniac, but more variably so:
./fake-commits.py -v -f 2001-03-10 -l 2001-03-17 -n 100 -r5 -P  # See what would happen

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.