Last updated 2023-08-29 07:06:35

GIT - Find The Number Of Files Changed

You can use the command below if you ever need to figure out how many files have changed before committing them. A good use case is when those changes are made using a script.

01: git diff --shortstat main 02: 03: # output: 3 files changed, 35 insertions(+), 24 deletions(-)

"main" is the branch name.

The --shortstat flag provides summarized stats for certain GIT [↗] commands like diff and log.

Here is another article you might like 😊 "Diary Of Insights: A Documentation Of My Discoveries"