Git Product home page Git Product logo

git-rewrite-author's Introduction

Rewrite author/committer history of a git repository

Have you ever accidentally committed to a git repository with a broken user config? No? But your co-workers have?

So, you're stuck with commits like this:

Author: root <root@localhost>

    Hotfix on the production server.  This was urgent!

Nasty. Or:

Author: John Doe <john@localhost>

    Fixed bug #1.  Committed on my laptop.

Would it be nice to rewrite history? And take care of committers, as well as of authors? Without all the hassle? Now, you can!

Usage:

$ git rewrite-author -w "John Doe <john@localhost>" "John Doe <[email protected]>"

Then, to push your changes to the default remote:

$ git push --force

Not using --force may duplicate the commits on origin, not replace them, so be careful with that.

You're not sure which authors/committers are hidden in your repository? What about:

$ git rewrite-author -l

Tags are rewritten automagically, too!

After you've checked everything is okay, you may wish to remove the original refs backed up by git --filter-branch:

$ git for-each-ref --format="%(refname)" refs/original/ | xargs -r -n 1 git update-ref -d

Enjoy!

Installation

Clone or download this repository and run:

$ python setup.py install

git-rewrite-author's People

Contributors

absurdhero avatar bamboo avatar davidfokkema avatar glensc avatar guillaumep avatar kaloyan-raev avatar nsimaria avatar sethwebster avatar

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.