Skip to content

Commit 736d262

Browse files
committed
Minor edits.
1 parent 93f3c95 commit 736d262

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

README.org

+23-2
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ git commit -m "Add peppers"
233233
git status
234234
#+END_SRC
235235
- Staging area is for creating sensible commits. You can edit multiple files and only add a subset of them to a given commit. This makes it easier to look back at your work.
236+
- What goes in a commit?
237+
- A coherent functional chunk (whatever that means)
238+
- If you wanted to cleanly roll back, what would that look like?
236239

237240
*** View commit history in the log
238241
#+BEGIN_SRC bash
@@ -339,6 +342,7 @@ git status
339342
# Move HEAD back to latest commit by checking out the branch name
340343
git checkout master
341344
#+END_SRC
345+
- You can also check out a tag.
342346
- Unfortunately some of these terms, like "checkout", are overloaded. Think about what you want to do to your history, then look up the appropriate command.
343347
*Instructor's note:* Update drawing with moving HEAD pointer
344348

@@ -387,8 +391,7 @@ This is a new feature we're trying out
387391
ls # Merging the feature branch adds your changes
388392
#+END_SRC
389393
- This is simplest possible case; all of the new changes were in one branch
390-
*Instructor's note:* Draw the branch history with the merge (Fast-Forward merge moves branch tag)
391-
*Instructor's note:* Drawing a branch history with competing changes (Recursive merge resembles octopus graph)
394+
*Instructor's note:* Draw the branch history with the merge (Fast-Forward merge moves branch tag). A branch history with competing changes is shown in the Conflicts section below (Recursive merge resembles octopus graph)
392395

393396
** Ignoring Things
394397
*** Create some output files
@@ -456,6 +459,7 @@ git pull
456459
- ~pull~ is a shortcut for ~fetch~ + ~merge~
457460

458461
** Collaborating
462+
*Instructor's note:* Demo this section with two terminal windows, one for "garden" and one for "garden-clone"
459463
*** Clone your repository
460464
#+BEGIN_SRC bash
461465
git clone https://github.com/devnich/garden.git ~/Desktop/garden-clone
@@ -542,6 +546,18 @@ git config --global merge.tool meld
542546
- Open source merge tools include Vimdiff, Meld, Kdiff, Gitfiend, Git Cola, etc. There are many other options!
543547
- Always pull before you push
544548
- To minimize conflicts, do your work on a separate branch
549+
** Pull Requests
550+
cf. https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
551+
Topics to discuss:
552+
- Shared Repository model vs. Fork-and-Pull model
553+
- Protected branches
554+
- Create a pull request
555+
- Request a PR review
556+
- Merging PR
557+
*** Shared Repository Workflow
558+
1. Clone repository
559+
2. Create branch
560+
3. Create pull request
545561

546562
** Graphical User Interfaces
547563
- Pro
@@ -569,6 +585,11 @@ git config --global merge.tool meld
569585
- git cherry-pick: Copy a single commit from a different branch. This rewrites your project history piecemeal, which can make it difficult to merge branches in the future.
570586

571587
* Additional reading
588+
** Shell
589+
- A directory of command line utilities: https://ss64.com/bash/
590+
- Bash guide: https://mywiki.wooledge.org/BashGuide
591+
- Using zsh on MacOS: https://scriptingosx.com/2019/06/moving-to-zsh/
592+
** Git
572593
- The Pro Git book: https://git-scm.com/book/en/v2
573594
- Graphical user interfaces for Git (useful for visualizing diffs and merges): https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Graphical-Interfaces
574595
- Git for Advanced Beginners: http://think-like-a-git.net

0 commit comments

Comments
 (0)