- use branching & merging to isolate changes to code
- describe the benefits of a cloud-based git service
- describe a situation in which a local server-based repo is sufficient
- clone a github based repo
- push changes from a local clone of a repo to the cloud-based repo
- add remote repos to your local clone
- create a pull request
- comment on a pull request
- ensure that your fork (and clone) are synchronized with changes in the "upstream" repo
- amend a pull request based on feedback
Chapter 15, pages 365-367
Chapter 16, pages
-
Add a layer to the onion with branching (20 min)
- describe branching workflow
- go to
planets
directory - create a new branch called
venus
- change to that branch
- create/edit a file named
venus.txt
that says "Kind of cloudy and hard to breath" - add/commit that file to this branch
- complete another edit/add/commit cycle to this file that says "Maybe we can build cities in the clouds"
- change to the
master
branch - look at differences between branches
- merge
venus
intomaster
-
Introduce rebase (20 min)
- from
master
create and switch to a new branchearth
- create/add/commit a file
earth.txt
with some interesting fact about earth - switch back to
master
- repeat with
jupiter
- switch back to
master
- compare
master
vsearth
andmaster
vsjupiter
- merge
earth
intomaster
- switch to
jupiter
- discuss rebase vs merge
- rebase
jupiter
ontomaster
- switch back to
master
- compare
master
vsjupiter
- merge
jupiter
intomaster
- from
-
discuss differences between simple server and cloud service (4 min)
- Code browsing with syntax highlighting
- Collaboration & access control
- Issue tracking
- Code review for new contributions
- Project management
-
discuss different options: esp. bitbucket & github (1 min)
-
discuss basic workflow of remote interaction (5 min)
-
simple server or cloud service
- clone once
- fetch, merge/rebase, (edit, add, commit) x many, push
-
-
fork/clone/add element to Chart of Nuclides (15 min)
- browse to CoN site
- explore GH repo
- fork repo
- explore their fork - how is it different from the parent
- clone repo
- choose an element (randomize) and create a branch with that name
- discuss why a branch
- use a number of edit/add/commit cycles to populate your element - at least partially
- push your changed branch back to your repo
- explore your changed repo
- browse to CoN site
-
Change your prompt to constantly show you some git status information
There are a number of different solutions shared on the internet for changing your bash prompt to show you the current branch you are in, and other information. Here are just a few:
-
Your life will be much simpler if you don't have to type your password every time you interact with github. I encourage you to set up an ssh key for this: