4 ms·
Could you not just use git log and pipe to grep or egrep? Heck, I’ve even piped git log to a file and then I can use my favorite text editor (VS Code) and use a
by temporallobe 7y ago
Could you not just use git log and pipe to grep or egrep? Heck, I’ve even piped git log to a file and then I can use my favorite text editor (VS Code) and use all kinds of fancy regexes.
- lukabratos 7y agoHey 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!
- deleted 7y ago[deleted]
- temporallobe 7y agoYou’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.
- lukabratos 7y agoYour 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.
- lukabratos 7y agoI'm intrigued to see and learn something new from your fancy regexes. Can you share some of them with us?