You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.org
+23-2
Original file line number
Diff line number
Diff line change
@@ -233,6 +233,9 @@ git commit -m "Add peppers"
233
233
git status
234
234
#+END_SRC
235
235
- 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?
236
239
237
240
*** View commit history in the log
238
241
#+BEGIN_SRC bash
@@ -339,6 +342,7 @@ git status
339
342
# Move HEAD back to latest commit by checking out the branch name
340
343
git checkout master
341
344
#+END_SRC
345
+
- You can also check out a tag.
342
346
- 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.
343
347
*Instructor's note:* Update drawing with moving HEAD pointer
344
348
@@ -387,8 +391,7 @@ This is a new feature we're trying out
387
391
ls # Merging the feature branch adds your changes
388
392
#+END_SRC
389
393
- 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)
392
395
393
396
** Ignoring Things
394
397
*** Create some output files
@@ -456,6 +459,7 @@ git pull
456
459
- ~pull~ is a shortcut for ~fetch~ + ~merge~
457
460
458
461
** Collaborating
462
+
*Instructor's note:* Demo this section with two terminal windows, one for "garden" and one for "garden-clone"
- 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.
570
586
571
587
* Additional reading
588
+
** Shell
589
+
- A directory of command line utilities: https://ss64.com/bash/
- Using zsh on MacOS: https://scriptingosx.com/2019/06/moving-to-zsh/
592
+
** Git
572
593
- The Pro Git book: https://git-scm.com/book/en/v2
573
594
- 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
574
595
- Git for Advanced Beginners: http://think-like-a-git.net
0 commit comments