diff --git a/6-13-2023 Cohort 2 Sync Notes.md b/6-13-2023 Cohort 2 Sync Notes.md index f9ffa68..fc2b594 100644 --- a/6-13-2023 Cohort 2 Sync Notes.md +++ b/6-13-2023 Cohort 2 Sync Notes.md @@ -1 +1,59 @@ -Welcome to Wiki! \ No newline at end of file +1700h: started + +Max is reporting that he didn't do a `git pull`, did a commit, and had to create a merge commit as a result. + +A typical workflow is: + +* Repository checked out, possibly with upstream changes on GOGS, +* You have not made any commits since your last `git pull`, +* You have unstaged changes in your working copy. + +If these conditions are met, the procedure is: + +1. Make *sure* you haven't made any commits using `git log`, then `git pull`. +2. If you receive an error message about an unclean tree, then do `git stash push`. +3. `git pull` +4. If you did `git stash push` earlier, now do `git stash pop`. +5. Stage your changes (`git add`), and commit them (`git commit`). + +There's three places involved: + +1. The working copy, which is where you checked the repository out, +2. The git stash, which is a temporary place for holding changes that haven't been staged or committed, and +3. The git stage, which is where you put changes that you want to group into a commit. + +The overall workflow is + +``` +working copy changes -> stash +upstream git server -> working copy +stash -> working copy +working copy changes -> stage +stage -> commit -> GOGS +``` + +1710h: + +Reading notes review: + +* Scott found that the `\_\_X\_\_()` methods and attributes are called "dunder" methods and attributes, where dunder is a contraction of "double underscore". +* Mentioned that the id() method returns a pointer. +* Mentioned that pass-by-reference and pass-by-value are two different ways of dealing with immutability. Python is mostly a pass-by-value system, so things like this won't change the caller's value: + +``` +>>> def f(a): +... a=2 +... +>>> a=1 +>>> a +1 +>>> f(a) +>>> a +1 + +``` +* Mentioned that "fruitful" means "net gain" in terms of the resources spent making the optimization. + +* Mentioned the issue database for documenting getting stuck. + +1735h: