Git Product home page Git Product logo

branch-diff's Introduction

branch-diff

A tool to list print the commits on one git branch that are not on another using loose comparison

npm npm

Usage

$ branch-diff [--simple] [--group] [--patch-only] base-branch comparison-branch

A commit is considered to be in the comparison-branch but not in the base-branch if:

  • the commit sha is identical, or
  • the commit summary is identical and the commit description is identical and a PR-URL exists in the metadata and is identical (in the description but split out by commit-stream)

The output is the same as changelog-maker and you can use --simple to simplify it for console output instead of Markdown.

The commit list is very close to running:

$ git log master..next

But the comparison isn't quite as strict, generally leading to a shorter list of commits.

Options

  • --version: Only prints branch-diff's package.json version.
  • --group or -g: Group commits by prefix, this uses the part of the commit summary that is usually used in Node.js core to indicate subsystem for example. Groups are made up of numbers, letters, , and -, followed by a :.
  • --exclude-label: Exclude any commits from the list that come from a GitHub pull request with the given label. Multiple --exclude-label options may be provided, they will also be split by ,. e.g. --exclude-label=semver-major,meta.
  • --require-label: Only include commits in the list that come from a GitHub pull request with the given label. Multiple --require-label options may be provided, they will also be split by ,. e.g. --require-label=test,doc.
  • --patch-only: An alias for --exclude-label=semver-major,semver-minor.
  • --format: Dictates what formatting the output will have. Possible options are: simple, plaintext, and sha. The default is to print markdown-formatted output; plaintext also implies that commits will be grouped.
    • simple: Don't print full markdown output, good for console printing without the additional fluff.
    • sha: Print only the 10-character truncated commit shasums. Good for piping though additional tooling, such as xargs git cherry-pick for applying commits.
  • --simple or -s: An alias for --format=simple.
  • --filter-release: Exclude Node-style release commits from the list. e.g. Working on v1.0.0 or 2015-10-21 Version 2.0.0.
  • --reverse: Reverse the results, this is especially useful when piping output to xargs
  • --commit-url:A URL template which will be used to generate commit URLs for a repository not hosted in GitHub. {ref} is the placeholder that will be replaced with the commit, i.e. --commit-url=https://gitlab.com/myUser/myRepo/commit/{ref}. {ghUser} and {ghRepo} are available if they can be derived from package.json (Gitlab and Bitbucket URLs should be understood in package.json).

License

branch-diff is Copyright (c) 2015 Rod Vagg @rvagg and licenced under the MIT licence. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.

branch-diff's People

Contributors

addaleax avatar codebytere avatar evanlucas avatar fishrock123 avatar rvagg avatar sam-github avatar targos 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.