Re:How do I find all the modifications of a given string usi...
by temporallobe on Friday April 17, 2020 @10:37PM
(#22904895)
You’re right, I probably didn’t (and don’t) understand. I thought that the problem you’re trying to solve is that you wanted to find a particular string that changed over time (past commits). So let’s say I wanted to look for isPizzaDelivered; Could I not do a git log |grep “isPizzaDelivered”? to find all occurrences of that string among all of the previous commits? I read your blog post thoroughly and maybe I’m just not getting it. Perhaps I need to try out the commands myself to see what the output would be so I can get a full picture of what you’re explaining.
Re:How do I find all the modifications of a given string usi...
by lukabratos on Saturday April 18, 2020 @05:01AM
(#22906318)
Your approach with git log |grep isPizzaDelivered would work if the string you wanted to find would be in the commit title or description.
git pickaxe is super handy because it will search for the selected string in all the commit changes instead.
Give it a go in one of your projects, it's super useful.
I should include some examples in the blog post to convey my message a little bit clearer.
I'm not sure if you really understand how pickaxe described in the blog post works. Let me clarify it for you again:
You could use git log: git log will return you git commit title and body.
With the command that I've described in my blog post you can investigate the whole lifecyle of the changes.
Try doing the same with your technique. I'm curious to see how I can do things in a better way.
Thanks!