Github is different from something called Git.
Git is a version control system that many programmers use to tracks changes in their code (or any other kinds of files). Git uses git commands using a terminal to track and update the changes we make to code (or other files).
Github is a place where we can share, collaborate on, and view the files that we are updating and tracking. YouTube: What is GitHub?
Some basic Git/Github vocabulary that you might hear in the wild includes: clone a repo, commit changes, push/pull commits, make a branch, checkout a branch, merge changes,...
The following is modified from github.com/susanev/uw-hcde-creative-computing
We are going to use Github, without the terminal (which is uncommon), to upload web files so that they can be shared with and viewed by others on the web.
- Login to Github
- Click the
+
in the upper-right corner and choose New repository - Fill in a repository name (e.g., cse-startup, cse-da-summer-2017, etc)
- Check Initialize this repository with a README
- Click Create repository
- Click Branch: master on the left-side, type gh-pages intro the text box, and press enter
- Click Settings, Click Branches, in the Default branch drop-down select gh-pages
- Click Update, and then click I understand, update the default branch.
- Click Code
- Click 2 branches
- Click the trash-can icon, deleting the master branch
- Click Code
- Click Upload Files
- Using your computer's file explorer, navigate to your Creature 2.0 files on your computer.
- Drag the entire folder (which contains
index.html
andsketch.js
at a minimum) into Github's drag and drop interface box - Write a short commit message to describe what you did (e.g. "Uploads my p5.js creature")
- Click Commit Changes
- Navigate to https://username.github.io/repositoryname/yourcreaturefolder/ where you replace username with your github username, replace repsoitoryname with your repository name, and replace yourcreaturefolder with the name of your creature folder. So mine is: http://sudocrystal.github.io/startup-test/creature_ex/
- Congratulate yourself! This website is live and you can share the link with others!
- Add a description to the repo with a link to the base part of this URL (everything except the creature folder) - we will use this later.
- Repeat Part 4 to add your cookie game to github
- Repeat Part 4 to add your pong game to github
It's kind of a pain to have to remember the folder name for each folder, so let's create a landing page with links to those pages.
- Click README.md
- Click the trash-can icon
- Add a commit message describing what you are doing (e.g. "Removes README")
- Click Create new file
- Name the file
index.html
- In the body of file, put
Check out some of my p5.js projects: <a href="yourcreaturefolder/">My Creature</a>
, where yourcreaturefolder is the name of your creature folder. - Add a commit message describing what you are doing (e.g. "Adds index.html with a link")
- Click Commit new file at the bottom of the page
- Navigate to https://username.github.io/repositoryname/ where you should now see the non-compliant HTML that you just wrote (we'll fix that soon!)
- Adds links to all your p5.js work