4. Git, GitHub, and a Jupyter Book#
4.1. What we’re going to do#
Today, we’re going to focus on an important tool in programming, git, and we’ll use it via GitHub.
4.2. What is GitHub?#
Let’s learn from the source: about
4.3. What is git?#
git is:
free
open source
distributed version control system
designed to be fast
flexible and can be used many ways
not tied only to github!
4.4. Distributed Version Control#
4.4.1. Version Control#
~like history on a google doc
keeps “versions” at points in time you get to pick
lets you make test changes without breaking your main copy
4.4.2. Distributed#
good for collaboration
everyone gets their own copy
programatic tools and social conventions to help you not mess it up
4.6. Examining the repo#
YAML files contain settings for various tools. ours have extenstion .yml and are used to tell GitHub how to turn this repo into a website. One is written for GitHub specifically and the other is for a program called jupyter book that can convert markdown and notebooks to HTML and provide helpful CSS for them.
README.md is a special markdown file for GitHub
index.md is the first content file for your project
.gitignore is a list of files and type of files that the git program should not track changes in
4.7. Making an issue.#
Make the title: Portfolio Start
put this in the body
## By noon on Friday:
- [ ] upload each notebook file
- [ ] edit the intro
- [ ] turn on "pages" to deploy from branch
## When you want
- [ ] clean up your notebooks by adding more text
- [ ] *optionally* [transfer ownership](https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository) of the repo to yourself and keep adding to it
GitHub issues use a special flavor of markdown, the [ ]
is not supported the same way everywhere, for example in prismia, that is how I make multiple choice questions for you.
this markdown cheatsheet is a good reference while you get used to it.
4.8. Make your site your own#
Edit the top of the _config.yml
file to have your own information in it
Set your site to serve from the gh-pages
branch
4.9. Adding Notebooks#
On JupyterHub, download one of your notebooks
Upload it to GitHub
4.10. GitHub Codespaces#
Enter the Codespace