Did you ever come across a line of code that you d *really* like to know when was introduced/deleted ?
Well, if you are using GIT for your project this might come handy.
Let's say the piece of text you are investigating is this:
a = get_something(some_var)
and it is located in the file some_folder/some_file.py
Then, try this command:
git log -S "a = get_something(some_var)" some_ folder/some_file.py
Then, GIT will look for the string we specified string within the commit history and output something like this:
commit
Author: Some Dude <some.dude@mail.com>
Date: Fri Feb 15 14:09:18 2013 -0300
The commit message of this commit.
This came quite handy to me recently. Hope it helps!
2 comentarios:
chango! si querés que alguien lea tu blog... AUMENTALE LA LETRA! Joder!
BTW, muy bueno el post!... luego de 6 Ctrl++
Jajajaja! No ser por qué se publicó con letra en 10pt. Ahí la agrandé.
Igual, se veía bien, che! :)
Abrazo, Humitos!
Publicar un comentario