Branch and Create a Lesson in a Single ZSH Function

John Lindquist
InstructorJohn Lindquist
Share this video with your friends

Social Share Links

Send Tweet

Once you've finished your demo locally, it's time to commit, push it to github, and share your demo online. This zsh function breaks it down into a single call.

John Lindquist: [0:00] After we finish our lesson, I'll say Lesson done.

[0:03] We'll want to check out a new branch. Add everything. Commit just with a message that's a timestamp. The push everything to the right branch and open a CodeSandbox, which is the embed link to our GitHub username. The current directory, which is the name of the repo with the branch name in there. Then open the Egghead new lesson page.

[0:24] This looks like +lesson lesson-done. Hit Enter. Commits pushes. Then, in my browser, it popped open this URL, which has my demo running inside of a CodeSandbox, where I could just copy this embed link and create my lesson over here.