- Prerequisites
- Sample Output
- Run Script From Repo Root Manually After Commit
- Rerun Script From Repo Root Manually After Commit
- Automate Execution As Git Hook
- Enhancements
- Git Repo Stats Project Support Group
- We have a current version of git locally installed.
- OSX: First install homebrew package manager and use it to install git: $ brew install git
- Win: Install git4win or install scoop package manager and use it to install git: $ scoop install git
- Linux: $ apt-get install git
- NOTE: OLDER Linux Versions May Need To Tell apt-get Where To Find Latest Git
- We have configured git locally.
$ git config --global user.name "John Appleseed"
$ git config --global user.email "[email protected]"
-
We have been using git and github to manage online project assets, from media to source code.
-
We desire expert use of git and githob.
-
We want to preemptively avoid code project bloat by tracking our git repo sizes.
- Project prereq questions: Git Repo Stats Project Support Group
$ bash git-repo-stats.sh
$ echo 'blahblahblahblahblahblahblahblahblahblahblahblah' > new file
$ git status
$ git add .
$ git status
$ git commit -m 'Added some stuff.'
$ git status
$ bash git-repo-stats.sh
$ echo 'bash git-repo-stats.sh' > .git/hooks/pre-commit; chmod 777 .git/hooks/pre-commit
$ git add .
$ git commit -m 'Added automation via soft link pre-commit hook.'
-
Add a .gitgnore file to omit repo sub-directories which we do NOT want to share.
-
Learn about testing your code and tracking dependencies.
-
Use git tree or git submodule.
-
To reduce .git/ subfolder size: delete it, reset project repo, reinitialize with git, add, commit.
$ rm -rf .git; git init; git add . ; git commit -m 'First commit or reset repo.'
-
Functionalize this tool and make that functions library a dependency.
-
Finish team dev dojo I, II, III.
-
Post about projects on LinkedIn and BigDataProcessing.
-
Have a suggestion for this project? Please submit a github project issue.
- Have a question about this project? Project Questions