Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

check lines of code added removed by a specific user

# its stupid long :P. but run this on linux in the root of your project :D
git log --shortstat --pretty="%cE" | sed 's/(.*)@.*/1/' | grep -v "^$" | awk 'BEGIN { line=""; } !/^ / { if (line=="" || !match(line, $0)) {line = $0 "," line }} /^ / { print line " # " $0; line=""}' | sort | sed -E 's/# //;s/ files? changed,//;s/([0-9]+) ([0-9]+ deletion)/1 0 insertions(+), 2/;s/(+)$/(+), 0 deletions(-)/;s/insertions?(+), //;s/ deletions?(-)//' | awk 'BEGIN {name=""; files=0; insertions=0; deletions=0;} {if ($1 != name && name != "") { print name ": " files " files changed, " insertions " insertions(+), " deletions " deletions(-), " insertions-deletions " net"; files=0; insertions=0; deletions=0; name=$1; } name=$1; files+=$2; insertions+=$3; deletions+=$4} END {print name ": " files " files changed, " insertions " insertions(+), " deletions " deletions(-), " insertions-deletions " net";}'
Comment

PREVIOUS NEXT
Code Example
Shell :: snap install chrome 
Shell :: how to make wsl backup 
Shell :: installing nmap on kali linux 
Shell :: sudo apt install openjdk-14-jdk 
Shell :: how to install quick.db 
Shell :: save android studio home bash_profile 
Shell :: Do you Need bash to hack 
Shell :: add pwd to path linux 
Shell :: django gitignore 
Shell :: kube delete cronjob 
Shell :: arch install fonts 
Shell :: az command to delete resource group 
Shell :: getting started with vite 
Shell :: vim open shell in current directory 
Shell :: error: insufficient permission for adding an object to repository database .git/objects 
Shell :: copy folder ubuntu 
Shell :: remove symfony ubuntu 
Shell :: array and for loop bash 
Shell :: ubuntu ifconfig not found 
Shell :: delete mulitple git branch 
Shell :: ssh-keygen and ssh-copy-id 
Shell :: archive tar 
Shell :: install node-pre-gyp 
Shell :: reinstall chrome ubuntu 
Shell :: ubuntu open file from terminal 
Shell :: linux install qt5widgets 
Shell :: ubuntu check ssh 
Shell :: install node js from ubuntu 
Shell :: video to gif ffmpeg 
Shell :: how to set up git for github 
ADD CONTENT
Topic
Content
Source link
Name
7+6 =