-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Duration: 20 minutes
We will use different analysis tools to identify wrong practices in a repository. To do it we will use the following commands:
- git-sizer
- git-find-dirs-many-files
- git-find-lfs-extensions
- git-find-dirs-unwanted
- git-filter-repo
Before starting any analysis, pick one repository of your preference that you would like to analyze.
⚠️ Make sure during all this exercise you don't post any private information that should not be shared publicly.
Clone this repository as we have added all the tools into the it for making the workshop more convenient:
# Clone the repository
git clone https://github.com/githubuniverseworkshops/grafting-monorepos.git
# or use the GitHub CLI
gh repo clone githubuniverseworkshops/grafting-monoreposStats of repo size: git-sizer
- Download the corresponding compiled version of
git-sizer.
Optionally you can install git-sizer using Homebrew if you are on Mac.
- Run the tool from the root of the repository to analyze:
/path/to/git-sizer --verboseFind files that should be in LFS: git-find-lfs-extensions
- Checkout the
grafting-monoreposrepository - Run the tool from the root of the repository to analyze:
/path/to/grafting-monorepos/scripts/git-find-lfs-extensionsPrint directories with the number of files contained: git-find-dirs-many-files
- Checkout the
grafting-monoreposrepository - Run the tool from the root of the repository to analyze:
/path/to/grafting-monorepos/scripts/git-find-dirs-many-filesFind dirs that should not be committed: git-find-dirs-unwanted
- Checkout the
grafting-monoreposrepository - Run the tool from the root of the repository to analyze:
/path/to/grafting-monorepos/scripts/git-find-dirs-unwanted | head -n 15 Analyze the repository: git-filter-repo --analyze
- Clone the
git-filter-repotool - Execute the tool from the linux repository
/path/to/git-filter-repo/git-filter-repo --analyzeReport out
Report your findings from the above commands in comments section below. Be sure to include answers to the following questions in your comments, if possible:
- Do you find any patterns?
- Was there anything surprising?
⚠️ Make sure during all this exercise you don't post any private information that should not be shared publicly.
For examples and more information, please see README.md -> Activity 2.