Skip to content

Instantly share code, notes, and snippets.

@ifigueroap
Last active August 29, 2015 14:18
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 ifigueroap/60716bbf4aa2f205b9c9 to your computer and use it in GitHub Desktop.
Save ifigueroap/60716bbf4aa2f205b9c9 to your computer and use it in GitHub Desktop.
git log, detecting rename
commit 038e436098ae98c3795cdab9ad3780b2590144bd
Author: Ismael Figueroa
Date: Tue Apr 7 15:05:57 2015 -0300
barbar
M b.txt
commit 3125110f5e68091551e3cef1539c696b47ca86bf
Author: Ismael Figueroa
Date: Tue Apr 7 15:05:20 2015 -0300
foo lines
M b.txt
commit fa7b79a15efa9b044b8ae25e012987fa349945b9
Author: Ismael Figueroa
Date: Tue Apr 7 14:43:43 2015 -0300
renamed a to b
D a.txt
A b.txt
commit 8b41027ea84e8606e02f96f57aa780064b2646db
Author: Ismael Figueroa
Date: Tue Apr 7 14:43:12 2015 -0300
added a
A a.txt
git log --name-status --format='%H' --follow -- b.txt
038e436098ae98c3795cdab9ad3780b2590144bd
M b.txt
3125110f5e68091551e3cef1539c696b47ca86bf
M b.txt
fa7b79a15efa9b044b8ae25e012987fa349945b9
R100 a.txt b.txt
8b41027ea84e8606e02f96f57aa780064b2646db
A a.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment