Coder Social home page Coder Social logo

rewrite-commit-messages's Introduction

Rewrite commit messages

This project allows you to rewrite Git commit messages in a fast and simple way using Java.

This project contains a very simple implementation of git filter-branch, limited to rewriting the commits itself. It does not contain support for rewriting the file trees, just the commits themselves.

The purpose of this project is to allow you to write a small bit of Java code that takes a CommitBuilder and RevCommit and change any properties of the CommitBuilder as you'd like. The purpose of the project is to prepare the CommitBuilder, ensure that parent's are updated to the new commit and all refs (i.e. branches and tags) are correctly rewritten.

Usage

To use this project, fork it in GitHub and clone it. After that, in your favorite Java IDE, open the App.java file and write your code in the rewriteCommit method, e.g.:

private static void rewriteCommit(RevCommit commit, CommitBuilder builder, NoteData note) {
    ///////////////////////////////////////////////////////////////////////
    // Rewrite the commit here!
    ///////////////////////////////////////////////////////////////////////
    
    builder.setMessage("CHANGED: " + builder.getMessage());
}

The above example shows how you can change just the commit message. You can use similar code to change the author and/or the committer.

License

This project is licensed under the LGPL v3 license.

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.