In many companies, there is an incentive to remove old code and refactor to use newer technologies or languages to make the solution smaller, easier to comprehend and maintain. If you are in a company that has goals to remove old code, it may be the case where you need to report on how many lines of code have been removed as part of your work. Here's how you might leverage Powershell to get the lines of code that you've removed from a Git repository.
The output you will get when running the Powershell code above, will look something like the below.
Repo at 'C:\Users\user\repos\projectx' stats for 2024: 48 files changed, 21074 insertions(+), 1 deletion(-)