

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
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
Back
ctrl+,
Next
ctrl+.
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:
Create a new branch off of main.
Go about your work on the feature branch making commits as you go.
When you're ready to get your code into main, squash all your commits into a single commit.
Push your branch to the remote repository.
Open a pull request from the feature branch into main.
Merge the pull request once it's approved.
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.shIt 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.