Skip to content

Instantly share code, notes, and snippets.

@kmagai
Created April 25, 2016 05:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmagai/6d2bc1faa82c7e165975a9aca55f001c to your computer and use it in GitHub Desktop.
Save kmagai/6d2bc1faa82c7e165975a9aca55f001c to your computer and use it in GitHub Desktop.
Gitでファイルの特定行の変更履歴を追う ref: http://qiita.com/kmagai/items/51d814fa931359105f19
git log -L <start>,<end>:<file>
> git log -L 1,10:Gemfile
commit d9acf7548943f4c60be50ee43b54ce638d4d0d3a
Author: kmagai
Date: Sun Apr 24 18:01:22 2016 +0900
hoge
-- a/Gemfile
++ b/Gemfile
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@@ -1,6 +1,5 @@
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5.2'
# Use sqlite3 as the database for Active Record
commit 3e858dafa6a9b0150e1607cc9befef4392d049dv
Author: kmagai
Date: Sun Apr 24 12:14:21 2016 +0900
init
-- /dev/null
++ b/Gemfile
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
@@ -0,0 +1,6 @@
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5.2'
# Use sqlite3 as the database for Active Record
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment