Paul's Python CoursePPC

Project 19 of 20, for Paul

Git and GitHub

Keep the history of a project with git: commits, branches and a conflict in the browser, then a real repository of your own, pushed to GitHub.

About an hour and a half, in 12 steps.

Sign up free to open itLog in

Act 2 needs a free account, so your work is saved as you go. Act 1 is open to everyone.

The brief

  • PaulMy first course notes live in one folder, with every version of everything labelled by date.
  • PaulHalf the labels are wrong, and some of them just say 'better'.
  • CaitlinMine are labelled 'final', 'final2' and 'actually final'.
  • PaulThere's a proper way to do it called git, and you'll be using it for the rest of your life.

Put the Workshop's job tracker under version control, here in the browser first:

  1. Make a repository and commit the project as it is.
  2. Change something, look at the difference, and commit again.
  3. Try an idea on a branch, then merge it back.
  4. When two changes collide, sort out the conflict and finish the merge.

Then for real, on your own computer:

  1. Make it a repository, with a README in your own words and a .gitignore, and commit it.
  2. Push it to a repository of your own on GitHub.
What it prints
workshop $ git log --oneline
3f9c2a1 (HEAD -> main) Merge branch 'prices'
8b0d4e2 Charge more for urgent jobs
c41a9e7 Add the gate repair
1d27f53 First version of the job tracker

What you learn

What's in it

  1. Photographs, not drawers
  2. The first photograph
  3. Change, look, commit
  4. A line of work of its own
  5. How Paul would try an idea
  6. An idea on a branch
  7. When two changes collide
  8. When two changes collide
  9. A copy somewhere else
  10. Your first repository, on GitHub
  11. Ship it