Git Product home page Git Product logo

pretty-diff's Introduction

Pretty Diff

Pretty diff generates colorized HTML diffs similar to the diff/commit views on GitHub. Simply use pretty-diff the same way you use git diff and you'll get pretty diffs. If you want to share the diff, you can use gist-diff and you'll get a new gist.

image

Installation

Simply install globally via npm:

npm install -g pretty-diff

Usage

pretty-diff

pretty-diff has no settings of its own. Simply provide whatever settings you want to pass to git diff.

For example, to see what changed in the last commit:

pretty-diff HEAD^

gist-diff

gist-diff has one setting: --public. By default gist-diff will generate a private gist. If --public is provided, the gist will be public. This setting can be specified anywhere (before or after the git diff settings).

gist-diff will attempt to create the gist using your GitHub account. In order to create the gist with your account, you will be prompted for your password. If you enter no password, then an anonymous gist will be generated. However, if you enter an incorrect password, then no gist will be generated.

Authentication

If you set your GitHub username in your git config, you will only be prompted for your password.

git config --global github.user "Your Username"

To avoid being prompted for your password, you can create a personal access token and store it in your git config. You don't need to set github.user if you're using a token.

git config --global gist-diff.token "Your token"

License

Copyright Scott González. Released under the terms of the MIT 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.