GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ph101pp/git-opensource: Clean commit history without losing contribution statistics.

BranchesTags
Open more actions menu

Latest commit

 

History

84 Commits
84 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
git-opensource.sh
git-opensource.sh
 
 
package.json
package.json
 
 

Repository files navigation

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.

About

Clean commit history without losing contribution statistics.

Resources

Readme
MIT license
Activity

Stars

7 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.