New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

git-opensource

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-opensource

Clear commit history while preserving contributor statistics.

latest
Source
npmnpm
Version
0.0.5
Version published
Maintainers
1
Created
Source

git-opensource

Before opensourcing, it is common practice in (larger) companies to erase all history from a projects git repository. This ensures that no proprietary information or IP remains anywhere in the commits which could cause legal issues or security vulnerabilities. However, this practice also contradicts one of the core fundamentals of opensource culture: Give credit where credit is due.

git-opensource is a small utility trying to solve this problem. It rewrites the current branch to a new target-branch, erasing all content from the commit history while preserving information about contributors and their statistics.

Installation

$ npm install -g git-opensource

Usage

# prepare
$ cd ./path/to/your/repository
$ git checkout "branch_to_rewrite" # i.e. "master"

# run
$ git-opensource <OPTIONS> [TARGET_BRANCH]

The newly created TARGET_BRANCH can now safely be published to the community. It only contains the final version of your code, ensuring that there is ZERO proprietary information or IP hidden in its history. At the same time it still contains all information about contributions to the project.

Options

-F, --force

If set, TARGET_BRANCH will be overwritten if it exists.

-M, --keep-messages

If set, original commit messages will be preserved.

-A, --author-commit

If set, author of final squash-commit will be current git user.
Note: This affects contribution statistics.

-m [MESSAGE], --commit-message [MESSAGE]

Defines commit message for the final squash-commit.
Default: git-opensource

-h, --help

Displays help.

FAQs

Package last updated on 23 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts