EDDYMENS

Published a year ago

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 😊 A row must be an array or a TableSeparator instance | Laravel artisan fix