Code Monkey home page Code Monkey logo

git-blame's Introduction

#git-blame

Toggle git-blame annotations for the current file in the gutter of atom editor.

screenshot

Usage

Toggling the gutter

There a few ways to toggle the git-blame gutter.

Right Click

Right click the file you want to blame. Select Toggle Git Blame options from the dropdown.

right-click-activate

Keyboard Shortcut

Show git blame for the currently active editor with the command ctrl-b. An editor pane is active if the the cursor is blinking on it.

Submodules

Submodules? No problem, git-blame should take care of that.

See the revision diff

Click on the revision hash in the gutter to be taken to the configured repository visual diff. See setting a custom remote repo url section below for support beyond bitbucket and github.

Options

Ignore White Space Diffs

If this option is selected, the git blame command will be run with -w option.

Show Only Last Names

If this option is selected, only the last word of the author's name will be displayed.

Date Format String

Default date format is YYYY-MM-DD. This feature is backed by moment.js. Any formats supported by moment are valid here.

Setting a Custom Remote Repo Url

This plugin will first check to see if your repo is backed by Github or Bitbucket so nothing is required if your repo is hosted on one of these.

If its not, you can easily set a custom revision URL string like so:

  • From the settings view go to settings for this package Git Blame
  • Check the box for "Use Custom Url Template If Standard Remotes Fail"
  • Set your url format string in the box labeled Custom Commit Url String

url-settings

The URL string should contain the following three placeholder variables wrapped in underscore template delimiters like so: <%- variable %>.

  • project - Will be replaced with the name of the project in your remote git repository. For this repo it would be alexcorre.
  • repo - Will be replaced with the name of the repository. For this repo it would be git-blame.
  • revision - Will be replaced with the full git revision hash you clicked on.

I'll use github as an example. Its already supported out of the box, but if it wasn't its custom url string would be:

https://github.com/<%- project %>/<%- repo %>/commit/<%- revision %>

So when you clicked on hash revision 12345 in this git-blame repository, you would visit the following url:

https://github.com/alexcorre/git-blame/commit/12345

Release History

This is now managed by standard-version. Use these conventions on your commit messages to have your changes show up in the auto-generated CHANGELOG.md.

  • 0.2.0: Initial Release
  • 0.2.1
    • Fix Issue #1. Remote URL parsing.
    • Added RemoteRevision unit tests
  • 0.2.2: Pull #6. Remote URL parsing without .git.
  • 0.2.3: Issue #5. Fix multiple gutters. Better error handling.
  • 0.2.4: React editor support. Support for repositories that don't specify a project.
  • 0.3.0
    • Resizable width of blame panel
    • git-blame view layer rebuilt in React
    • See commit message tooltip when hovering over a commit
    • git-blame now updates to pick up changes on save
    • support for remote repositories that have "." in project or repo names
  • 0.3.1: Issue #41. Option to blame with -w.
  • 0.3.2: Issue #43.
  • 0.3.3: Fix gramatical issues in error prompts.
  • 0.4.0: Shadow DOM compatibility, Atom 1.0 fixes
  • 0.4.1: Fix Atom 0.190.0 deprecations
  • 0.4.2: Add support for multi repository projects. Fix issue when blaming empty files.
  • 0.4.3: Remove further deprecations
  • 0.4.4: Fix #90
  • 0.4.5: Fix startup issues and the ability to click on a sha links. Thanks @filipminev
  • 0.4.6: Add option to choose author name format. Thanks @javawizard
  • 0.4.7: Make gutter width adjustable via settings. Thanks @wouterds
  • 0.4.8: Upgrade pathwatcher node module to latest

git-blame's People

Contributors

alexcorre avatar dmnd avatar kylepdavis avatar blimmer avatar filipminev avatar michaek avatar wouterds avatar tomkadwill avatar thaggie avatar formigarafa avatar boie0025 avatar crazymykl avatar kendaleiv avatar jsnajdr avatar piohhmy avatar andrew-sk avatar alhadis avatar javawizard avatar itsnotvalid avatar adrianlee44 avatar

Watchers

James Cloos 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.