

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Squashing
incomplete
2: How to Squash
incomplete
3: Overwrite
incomplete
4: Force Push
incomplete
5: Squashing Is Scary
incomplete
6: Squashing PRs
incomplete
7: Squash Series
incomplete
8: Pull Request
incomplete
9: Merge the Pull Request
incomplete
This lesson's interactive features are locked, please to keep using them
So we did a weird thing (squash commits on main), now let's do the common thing: squash all the commits on a feature branch for a pull request. If your team prefers single-commit-pull-requests, this will likely be your workflow:
main.main, squash all your commits into a single commit.main.First, let's just do points 1 & 2. MegaCorp needs you to add a new feature to the content management system. Specifically, they need a script that will automatically scan for sensitive information in the repo.
printf "\n====== SCANNING FOR CREDIT CARD NUMBERS ======\n"
grep -rE --color=always '(\b[0-9]{4}[- ]?){3}[0-9]{4}\b' . --exclude-dir={.git} --line-number
echo "========= CREDIT CARD SCAN COMPLETE =========="
./scripts/scan.sh
It should find some credit card numbers in the customers/unstructured.txt file!
printf "\n==== SCANNING FOR SOCIAL SECURITY NUMBERS ====\n"
grep -rE --color=always '\b[0-9]{3}-[0-9]{2}-[0-9]{4}\b' . --exclude-dir={.git} --line-number
echo "======= SOCIAL SECURITY SCAN COMPLETE ========"
printf "\n========= SCANNING FOR PHONE NUMBERS =========\n"
grep -rE --color=always '\b[0-9]{3}-[0-9]{3}-[0-9]{4}\b' . --exclude-dir={.git} --line-number
grep -rE --color=always '\([0-9]{3}\) [0-9]{3}-[0-9]{4}' . --exclude-dir={.git} --line-number
echo "========= PHONE NUMBER SCAN COMPLETE ========="
Run and submit the CLI tests.