In this hands-on workshop we will be covering version control systems (a.k.a. source control): what they are, why every coder needs them, and how to use the popular source control tool git
for solo and collaborative coding.
The repository is available here: https://github.com/brown-ccv/how-to-pr
<aside> ⚡ To take part, you’ll need a github.com account – go to github.com/join and sign up now
</aside>
<aside> 🔥 A distributed version control system (VCS) records computer files – their histories and variants – and helps with merging different variants.
</aside>
Diagram of 5 versions of three different files. From https://git-scm.com/book/en/v2/Getting-Started-What-is-Git%3F
A series of commits on two branches. Adapted from https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging
Every coder needs a version control system, and it might be git
<aside> 🎯 Aim for the Workshop
Collectively format a copy of the Wikipedia page about Git using “Markdown,” one of the text formats which GitHub uses for README files, comments on code, etc.
</aside>
Get Started with GitHub and VSCode
Branch
Choose an issue.
Clone the repository.
Make a “branch” which can be shared, where you can make changes.
Make a series of “commits” where you actually fix the issue, bit-by-bit.
“Push” your branch to GitHub.
Make a “pull request” (PR) which requests to incorporate (”pull”) the changes in your branch into the main branch.
Merge
Reviewers will have the chance to look at the PR and (usually) suggest changes and improvements, or to say “this is great, let’s merge it!”
Someone will merge the approved PR (or close it otherwise).
After merging, the now-defunct branch can be deleted.
Everyone will update their now-outdated-PRs to incorporate the new merged changes, before they too are merged.
If people work on the same part of the document, then the authors will resolve the conflicting changes.
Set up checks to ensure that only approved and working PRs can be merged into main.
The CCV uses conventional names for issues, pull requests, branches and commits.
Setting up your GitHub organization for collaboration using more advanced tools.