Class 3B: Branches and Pull Requests with Git
Contents
Class 3B: Branches and Pull Requests with Git¶
Before this class, please make sure you watch the assigned Git videos on this page.
During class we will do the following:
Announcements¶
How to submit your Project information (5 mins).
Logistics questions (5 mins)
Demos on Branches and PRs (30 mins)
Git and GitHub and Demos¶
Switch to a branch¶
To checkout a new branch that doesn’t already exist, use:
git switch -c new_branch_name
This command is equivalent to git checkout -b new_branch_name
.
To switch to a new branch that already exist, use:
git switch branch_name
This command is equivalent to git checkout branch_name
.
Demo
Submit a pull request¶
Once you push the changes, you can log in to GitHub.com and submit a Pull Request.
Demo
Code Reviews¶
Demo