Difference between revisions of "DPS909 & OSD600 Fall 2018"

From CDOT Wiki
Jump to: navigation, search
Line 167: Line 167:
 
***<code>git reset</code> - update the staging area, and perhaps working directory, with files from another commit (e.g., HEAD)
 
***<code>git reset</code> - update the staging area, and perhaps working directory, with files from another commit (e.g., HEAD)
 
***<code>git checkout</code> - switch to a branch or commit, or create, or get files from a branch/commit
 
***<code>git checkout</code> - switch to a branch or commit, or create, or get files from a branch/commit
 +
 +
== Week 5 ==
 +
 +
* [https://github.com/humphd/hacktoberfest-at-seneca-2018 Release 0.2: Hacktoberfest]
 +
** For Tuesday October 9th (Lab 3)
 +
*** First (of 5) PR completed with a Blog Post
 +
*** Submit via https://github.com/humphd/hacktoberfest-at-seneca-2018/wiki/Student-Submissions
 +
** Add projects that you think are good for other students to https://github.com/humphd/hacktoberfest-at-seneca-2018/wiki/Interesting-Open-Source-Projects
 +
 +
* Merging with git
 +
** Where <code>git branch</code> splits histories apart, <code>git merge</code> brings them back together
 +
** Understanding DIFFs and Patch files
 +
*** <code>git diff</code>, <code>git show</code>, <code>git log -p</code>, etc. to show DIFFs
 +
*** [https://github.com/filerjs/filer/pull/395 Pull Requests] also have links to get the raw [https://patch-diff.githubusercontent.com/raw/filerjs/filer/pull/395.diff .diff] and [https://patch-diff.githubusercontent.com/raw/filerjs/filer/pull/395.patch .patch]
 +
*** [https://blog.humphd.org/vocamus-906/ How to read a DIFF file]
 +
** Types of Merges: Fast Forward, Recursive Merges are the most common
 +
*** <code>--ff-only</code> to force a fast-forward (only the branch pointer is moved, no new commit is created)
 +
*** 3-way merges: two branch commits with a common ancestor (new commit is created with multiple parents)
 +
*** Can have any number of parents though: one of the larges is a 66 commit octopus merge in the Linux kernel
 +
** How to merge
 +
*** start with a clean working directory
 +
**** <code>commit</code> your work if you can; or
 +
**** <code>stash</code> (<code>git stash list</code>, <code>git stash show</code>, <code>git stash pop</code>)
 +
*** checkout the branch you want to merge '''into'''
 +
*** <code>git merge branch_to_merge_into_this_branch</code>
 +
** Various flags and commands to know:
 +
*** <code>git merge --squash</code>
 +
*** <code>git merge --abort</code>
 +
*** <code>git merge --continue</code>
 +
*** <code>git branch -d</code>
 +
** [https://blog.humphd.org/fearless-merges/ Doing big merges in git]

Revision as of 15:10, 3 October 2018

Week 1

  • Course introduction

Week 2

  • Licenses
    • Rights, privileges, responsibilities, etc. applicable to someone other than the work's creator
    • "Terms and Conditions"
    • These must be granted by a copyright holder

Week 3

  • Consider Speaking and/or Attending the Free Software and Open Source Symposium (FSOSS).
  • Real world examples:
    • Filing, Fixing a bug in Filer
    • Adding a new Feature, Tests, and Docs to Filer - support node's new recursive fs.mkdir in Filer

Week 4

  • More Git
    • Git Walkthrough Part I
    • Git Walkthrough Part II
    • Some basic git commands you should make sure you know how to use:
      • git clone - clone an existing repository (i.e., one you've forked on GitHub)
      • git status - check what's happening with your repo, working directory, branch info
      • git add - add a file, files, or folder(s) of file(s)
      • git commit - commit changes in the staging area
      • git log - look back at existing commits
      • git diff - look at the difference between what's in the working directory and staging area, or between two commits
      • git rm - remove a file
      • git mv - move or rename a file
      • git reset - update the staging area, and perhaps working directory, with files from another commit (e.g., HEAD)
      • git checkout - switch to a branch or commit, or create, or get files from a branch/commit

Week 5

  • Merging with git
    • Where git branch splits histories apart, git merge brings them back together
    • Understanding DIFFs and Patch files
    • Types of Merges: Fast Forward, Recursive Merges are the most common
      • --ff-only to force a fast-forward (only the branch pointer is moved, no new commit is created)
      • 3-way merges: two branch commits with a common ancestor (new commit is created with multiple parents)
      • Can have any number of parents though: one of the larges is a 66 commit octopus merge in the Linux kernel
    • How to merge
      • start with a clean working directory
        • commit your work if you can; or
        • stash (git stash list, git stash show, git stash pop)
      • checkout the branch you want to merge into
      • git merge branch_to_merge_into_this_branch
    • Various flags and commands to know:
      • git merge --squash
      • git merge --abort
      • git merge --continue
      • git branch -d
    • Doing big merges in git