How to upload Swift projects and push them to GitHub?

Hi, does anyone know how to create local files on mac just to save down the mini Swift projects and push it to Github? I have watched the “How to Push Code to Github” by Codeacademy on Youtube but she didn’t explain the creating files part. Thanks!

This post was flagged by the community and is temporarily hidden.

thank you! This is very informative and helpful.
I wonder if you also know how to clone the completed project/excerise from Codecademy to my macbook and push it to GitHub? - I know you have explained in details for the pushing to GitHub bit, I just want to know about the part on cloning the existing excerise on the Codecademy webiste to my computer bit, instead of writing Swift code on a new file.
p.s. I know many have suggested to copy on a clipboard but i don’t seem to be able to find a “clipboard” on my laptop…