App-GitUtils

 view release on metacpan or  search on metacpan

script/gu  view on Meta::CPAN

 271205519

 % gu du-committing | datasize-to-metric
 258.6MB

(Note: L<datasize-to-metric> is from L<App::DataSizeSpeedUtils>).

You can do something like this in a `pre-commit` Bash script hook, for example:

 # GitHub rejects commit size over 2GB
 if [[ `gu du-committing` > $[2*1024*1024*1024] ]]; then
   echo "Cancelling commit, too large, will be rejected by GitHub"
   exit 1
 fi

=head2 Subcommand: split-commit-add-untracked

If you have untracked files with a total size of larger than 2GB, you can split
the commit using this subcommand:

 % gu split-commit-add-untracked



( run in 0.823 second using v1.01-cache-2.11-cpan-ceb78f64989 )