0.0
Repository is archived
No commit activity in last 3 years
No release in over 3 years
A Git subcommand to list modified files in git commit
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 0
>= 0
 Project Readme

Taken over by https://github.com/banyan/git_modified_files

git-modified Circle CI Rubygems

A Git subcommand to list modified files in git commit or from current working tree

Installation

$ gem install git-modified

Usage

  • Get modified files from current working tree if no argument is given
$ touch a.txt
$ git modified
a.txt
  • Get modified files in git commit if argument is given
$ git modified fbb1185
actionpack/lib/action_dispatch/testing/integration.rb

Tips

Open files with editor

$ vim -p `git modified`

Open files with tig

I often use tig while I'm writing codes. No matter how I feel it's perfect, I would find mistakes soon when I check with tig. Tig has e mode which opens file in editor, yet cursol should be on the files. git-modified is handy if you would like to open files with commit sets. It can be available with following tig bindings in .tigrc.

bind main K !<sh -c "vim -p $(git modified %(commit))"
bind diff K !<sh -c "vim -p $(git modified %(commit))"
bind log  K !<sh -c "vim -p $(git modified %(commit))"

In this example, I use vim (-p is opening files in tabs), but it can be modified to any editor, also binding key (K) as well.

git-modified

License

Licensed under the MIT license