In my Work globally page I discuss the importance of using GitHub to make yourself known and show off your talents. It is also a great place to discover other projects that you can learn from and teams that you can participate in.
Don’t forget to send me an email (following the instructions on the Challenges page) to Mi**************@gm***.com.
- Go to GitHub.com
- Read up on what it is and how it works.
- Click the ‘Sign up’ button and create yourself a free account.
- Search around for projects that interest you and get a feel for how they are layed out.
- Visit my page: https://github.com/MichaelKentBurns and checkout some of my repositories. One you might find interesting is MichaelKentBurns.com which is the project which is the repository for this site. Yes, I keep an entire WordPress site captured in a repository.
- Also checkout the repository in which I captured the process I went through in developing my next challenge: Challenge-Interactive-rating-component, look at the text of the file Notes.md to see how I did it.
- Note that the GitHub site is where the public facing copy of your repository is stored. But, you don’t want to do your work there, in fact you can’t. Instead the idea is that you create a copy of that repository locally on your own machine and develop in that copy. There are two ways to upload your progress at each step on the way. One is the original ‘git’ cli command. That requires a little learning which is not a bad idea. But there is a companion Desktop app that looks a lot like the GitHub.com site. It is called GitHub Desktop. You can download that from this link now and install it. Alternatively, once you have created your first repository and want to ‘clone’ it to your desktop machine, the cloning process will offer to install the desktop app for you and feed it the command to do the copy of your new repository.
- To get a feel for how this works, take the time to create a ‘my first repo’ repository and clone it to your desktop machine. Then code a simple ‘HelloWorld.html’ page. If you are not familiar with “Hello, World!” checkout the wikipedia page. There you will find source for this simple starter app in almost any language known, including HTML. When you have coded it, then use the desktop app to commit that and push it to your public repository.
- Once you have it working locally and have pushed it to the GitHub site you can actually create a ‘GitHub Page’ to publish the working page for the whole world to see. To do that when looking at the repository in GitHub.com, you will see a number of tabs along the top: ‘<> Code’, ‘Issues’, … ‘Settings’. Pick the Settings. It will automatically fill in the repository name, and the Default branch will probably be set to ‘main’. On the left side of the screen in the sidebar, under ‘Code and automation’ there is an item named ‘Pages’. Pick that. Once there it’s pretty easy. Under ‘Source’ there is a selector to pick the branch. That should already say ‘Deploy from a branch’. Leave that as it is. Below that is a section labeled ‘Branch’. In there are two buttons that should say ‘None’ and ‘Save’. It is not real obvious but click the ‘None’ button and select the ‘main’ branch’. Finally press the ‘Save’ button. It should then tell you ‘Your GitHub Pages site is currently being built from the
main
branch. Learn more about configuring the publishing source for your site.’ In a few moments you can refresh that page and see a note near the top that says something like ‘Your site is live at https://michaelkentburns.github.io/Hello-World/Last deployed byMichaelKentBurns 1 minute ago’. Just click that link or the ‘Visit site’ button.
- Now that it is published live, you can make a small change to your local copy of the program and commit and push that to GitHub and within a short time your change will be live. On the right side of the repository page, near the bottom you will see a section labeled ‘Deployments’.
You have probably done this now! Congratulations.
Don’t forget to finish your email with a link to your new repository.