So I’ve been sharing a number of PowerShell tools I’ve created for working with Git, including a few for getting tips from the Git Tips project on GitHub. My initial work was based on the fact that I had a local clone of that repository and wanted to search the local tips.json file. But I realized some of you may not want to clone the repository or be able to keep it up to date. Since the json file is available online and PowerShell has tools for grabbing Internet content, I decided to provide a version that combines the functionality of my earlier commands with the ease of searching online.
As part of my process of learning an using Git I am trying to get in the habit of using meaningful commit messages. Sure, you can get by with a single line comment which is fine when running git log –oneline. But you can use a multi-line commit message. However, this requires a little planning which is probably not a bad thing. Because my Git projects are PowerShell related and I most often and in the PowerShell ISE I came up with a little trick that works for me.
I’m always on the lookout for new ways to do things. Often I’m trying to find a way to create something that is easy to use without requiring a lot of PowerShell scripting. I also like using the final result as teaching aids so even if you don’t need the end product, I hope you’ll pick up a trick or two that you can use in your own scripting projects. The task I had in mind today is a better way to get event log information. Not the events themselves, but rather the event log file. How many entries are in it? How big is it? How much of the configured log is being used? Here’s what I came up with.
This year I’ve really taken to learning Git and how to incorporate it into my daily work routine. If nothing else this has been a great reminder about what it is like to learn something totally new and foreign. I’ve learned quite a bit, but am far from considering myself a master. Git is a big topic so I’m always looking for new ways to learn and use it. Continue reading
During my day I may be working on multiple files in the PowerShell ISE. Often these files are part of different modules and since I use git I generally need to be in the same directory as the file I’m working on. This necessitates a lot of manually changing location in the PowerShell ISE prompt. Or I might open the PowerShell ISE and then select some files from MRU list. But again, if I need to jump to the corresponding directory, that can be a tedious process. Continue reading