Skip to content

Commit

Permalink
Add prepare the commit demo videos
Browse files Browse the repository at this point in the history
Add demo videos for prepare the commit section.

These videos demonstrate how to squash commits and update the commit
message.
  • Loading branch information
mikelorant committed Jan 4, 2024
1 parent 3282fb7 commit 5d5e58e
Show file tree
Hide file tree
Showing 7 changed files with 167 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pages/prepare-the-commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ pick 2 feature1_fix

</v-click>

---
layout: full
preload: false
---

<video autoplay controls loop>
<source src="/videos/prepare-the-commit-squash.webm" type="video/webm">
</video>

---
layout: center
---
Expand Down Expand Up @@ -114,6 +123,15 @@ Part of JIRA-123

</v-click>

---
layout: full
preload: false
---

<video autoplay controls loop>
<source src="/videos/prepare-the-commit-update-message.webm" type="video/webm">
</video>

---
hideInToc: true
---
Expand Down
3 changes: 3 additions & 0 deletions public/videos/prepare-the-commit-squash.webm
Git LFS file not shown
3 changes: 3 additions & 0 deletions public/videos/prepare-the-commit-update-message.webm
Git LFS file not shown
36 changes: 36 additions & 0 deletions scripts/video/tapes/prepare-the-commit-squash.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Output ../../public/videos/prepare-the-commit-squash.webm

Set Width 1050
Set Height 700

Source tapes/sources/init.tape

Type "git reset --hard HEAD~" Enter Sleep 0.25

Source tapes/sources/git-commit-feature1.tape
Source tapes/sources/git-commit-feature1-improve.tape

Type "git commit" Sleep 1 Enter
Type "i" Sleep 0.25
Type "Improve feature1" Sleep 1
Escape
Type "ZZ" Sleep 3

Ctrl+L Sleep 0.25

Show Sleep 1

Type "git fetch origin main:main" Sleep 1 Enter Sleep 3

Type "git rebase -i main" Sleep 1 Enter Sleep 3
Down Sleep 1
Type "cw" Sleep 1
Type "f" Sleep 3
Escape
Type "ZZ" Sleep 3

Ctrl+L Sleep 0.25

Type "git show -p main.." Sleep 1 Enter Sleep 3

Source tapes/sources/terminate.tape
56 changes: 56 additions & 0 deletions scripts/video/tapes/prepare-the-commit-update-message.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Output ../../public/videos/prepare-the-commit-update-message.webm

Set Width 1050
Set Height 700

Source tapes/sources/init.tape
Source tapes/sources/git-commit-chore.tape

Type "git switch -c chore/update-deps" Enter Sleep 0.25

Source tapes/sources/git-commit-chore-update.tape

Ctrl+L

Show Sleep 1

Type "git show -p main.." Sleep 1 Enter Sleep 3

Ctrl+L Sleep 0.25

Type "git commit --amend" Sleep 1 Enter Sleep 1
Type ":g!/^#/d" Sleep 1 Enter Sleep 1
Type "O" Sleep 1

Set TypingSpeed 25ms

Type "Update dependencies to latest stable versions" Enter
Enter
Type "Upgraded third-party libraries to their latest stable releases to"
Type " incorporate security patches, bug fixes, and performance improvements."
Type " This routine maintenance helps keep the codebase secure and efficient." Enter
Enter
Type "- Updated package.json with the latest library versions" Enter
Type "- Adjusted code where breaking changes were introduced" Enter
Type "- Ran the full test suite to ensure compatibility with updates" Enter
Enter
Type "These changes are a proactive measure to mitigate potential security"
Type " vulnerabilities and maintain the reliability of our application in light"
Type " of new software updates." Enter
Enter
Type "Part of JIRA-123"

Set TypingSpeed 50ms

Sleep 3

Escape
Type "ZZ" Sleep 3

Ctrl+L Sleep 0.25

Type "git show -p main.." Sleep 1 Enter Sleep 5
Type " " Sleep 1
Type "q" Sleep 1

Source tapes/sources/terminate.tape
26 changes: 26 additions & 0 deletions scripts/video/tapes/sources/git-commit-chore-update.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Type "vim package.json" Enter Sleep 1

Type "5G"
Type "1f1"
Type "r2"

Down
Type "1f0"
Type "r1"
Right 2
Type "r0"

Type "3G"
Type "2f0"
Type "r1"

Type "ZZ" Sleep 1

Type "git add -p" Enter Sleep 1
Type "y" Sleep 1 Enter Sleep 1

Type "git commit" Sleep 1 Enter
Type "i" Sleep 0.25
Type "Update dependencies" Sleep 1
Escape
Type "ZZ" Sleep 3
25 changes: 25 additions & 0 deletions scripts/video/tapes/sources/git-commit-chore.tape
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Type "vim package.json" Enter Sleep 1

Type "i"
Type `{` Enter
Type `"name": "app",` Enter
Type `"version": "1.0.0",` Enter
Type `"dependencies": {` Enter
Type `"my_dep": "2.1.0",` Enter
Type `"another_dep": "5.0.2",` Enter
Type `}` Enter
Type `}`
Escape

Type "ZZ" Sleep 1

Type "git add -N package.json" Enter Sleep 1

Type "git add -p" Enter Sleep 1
Type "y" Sleep 1 Enter Sleep 1

Type "git commit" Sleep 1 Enter
Type "i" Sleep 0.25
Type "Add dependencies" Sleep 1
Escape
Type "ZZ" Sleep 3

0 comments on commit 5d5e58e

Please sign in to comment.