Difference between revisions of "DPS909 & OSD600 Fall 2019"

From CDOT Wiki
Jump to: navigation, search
(Week 1)
(Week 7)
 
(34 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
** [[OSD600]]
 
** [[OSD600]]
 
** How to be successful in this course
 
** How to be successful in this course
 +
 +
* Labs
 +
** Weekly labs, typically done in class
 +
** Labs are due on the Friday of the week they are assigned by midnight
 +
** Marked using Pass/Fail scheme
 +
** All labs must be completed to pass the course
 +
** [[DPS909 & OSD600 Fall 2019 - Lab 1|Lab 1]] is available now
  
 
* Releases
 
* Releases
** [https://wiki.cdot.senecacollege.ca/wiki/DPS909#Grading 4 releases, some with multiple bugs/PRs required]
+
** [https://wiki.cdot.senecacollege.ca/wiki/DPS909#Grading 4 releases, some with multiple bugs/PRs required], including participating in [https://hacktoberfest.digitalocean.com/ Hacktoberfest 2019]
 +
** Due Dates: Sept 20, Oct 31, Nov 20, Dec 6
 
** Chance to work on real code, real projects
 
** Chance to work on real code, real projects
 
** Big learning curve, lots of time required
 
** Big learning curve, lots of time required
 
** Amazing chance to gain experience, network, build your skills and resume
 
** Amazing chance to gain experience, network, build your skills and resume
 +
** Work with new and emerging technologies, gain exposure to tech outside the classroom
  
 
* Discussion/Readings
 
* Discussion/Readings
 
** Copyright ([https://www.youtube.com/watch?v=ljNS5p3cqls&feature=youtu.be Copyright in Canada video])
 
** Copyright ([https://www.youtube.com/watch?v=ljNS5p3cqls&feature=youtu.be Copyright in Canada video])
*** https://twitter.com/stan_sdcollins/status/1079395470731030528
 
 
*** [https://en.wikipedia.org/wiki/IANAL IANAL]
 
*** [https://en.wikipedia.org/wiki/IANAL IANAL]
 
*** Who created it, "owns" it.
 
*** Who created it, "owns" it.
Line 24: Line 32:
 
*** In a software project, there can be many copyright holders (e.g., many contributors), or all contributors may assign their copyright to the project (e.g., [https://en.wikipedia.org/wiki/Contributor_License_Agreement CLA], which we'll cover later)
 
*** In a software project, there can be many copyright holders (e.g., many contributors), or all contributors may assign their copyright to the project (e.g., [https://en.wikipedia.org/wiki/Contributor_License_Agreement CLA], which we'll cover later)
  
** What is Open Source?
+
* What is Open Source?
***[https://opensource.org/osd The Open Source Definition]
+
**[https://opensource.org/osd The Open Source Definition]
 
** [https://www.bloomberg.com/news/articles/2018-06-04/microsoft-agrees-to-buy-coding-site-github-for-7-5-billion Microsoft buys GitHub for 7.5 Billion - "We're all in on open source"]
 
** [https://www.bloomberg.com/news/articles/2018-06-04/microsoft-agrees-to-buy-coding-site-github-for-7-5-billion Microsoft buys GitHub for 7.5 Billion - "We're all in on open source"]
 +
*** https://twitter.com/asynchio/status/1082702841964244992
 
** [https://jvns.ca/blog/2018/09/01/learning-skills-you-can-practice/ Julia Evans, "How to teach yourself hard things"]
 
** [https://jvns.ca/blog/2018/09/01/learning-skills-you-can-practice/ Julia Evans, "How to teach yourself hard things"]
  
* Slack
+
== Week 2 ==
** https://seneca-open-source.slack.com
+
 
** [https://get.slack.help/hc/en-us/articles/115004071768-What-is-Slack Slack, Getting Started]
+
* Blogging
** [https://get.slack.help/hc/en-us/articles/217626358-Tour-the-Slack-app Tour the Slack app]
+
** Add bio/profile info as you feel comfortable, including links to GitHub, social media, etc.
 +
** Blog Post Tips:
 +
*** Use blog post titles that help a reader (or Google searcher) to know whether this is useful info to them
 +
*** Include links: a blog should connect different resources and ideas through your experience and learning
 +
*** Write in sections.  Try to avoid a wall of text, with only a single paragraph.  Consider using sub-headings, shorter paragraphs
 +
*** Use formatting for source code.
 +
** One good source of blog posts on open source and software development is [https://news.ycombinator.com Hacker News].  Some recent examples to look at for style:
 +
*** https://css-tricks.com/how-to-contribute-to-an-open-source-project/
 +
*** https://antoinevastel.com/javascript/2019/09/09/improving-obfuscator.html
 +
*** https://localghost.dev/2019/09/everything-i-googled-in-a-week-as-a-professional-software-engineer/
 +
*** https://randomascii.wordpress.com/2019/09/08/taskbar-latency-and-kernel-calls/
 +
 
 +
* 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 
 +
 
 +
* No License
 +
** What can you do with code you find that has no license?
 +
** [https://choosealicense.com/no-license/ what can I, can't I do?]
 +
 
 +
* Proprietary Licenses
 +
** [https://www.spotify.com/ca-en/legal/end-user-agreement/ Spotify End User Agreement]
 +
** [https://www.microsoft.com/en-us/Useterms/Retail/Windows/10/UseTerms_Retail_Windows_10_English.htm Microsoft Windows]
 +
** [https://www.apple.com/legal/sla/docs/iOS12.pdf iOS 12 (pdf)]
 +
 
 +
* Public Domain
 +
** [http://www.sqlite.org/copyright.html SQLite], which is now used by literally everybody, see http://www.sqlite.org/famous.html
 +
** [http://unlicense.org/ Unlicense]
 +
 
 +
* BSD License
 +
** Family of Licenses, including [https://opensource.org/licenses/bsd-license.php 2-Clause BSD], [https://opensource.org/licenses/BSD-3-Clause 3-Clause BSD (aka New BDS)], [https://en.wikipedia.org/wiki/BSD_licenses#4-clause_license_.28original_.22BSD_License.22.29 4-Clause BSD]
 +
** [https://www.freebsd.org/doc/en/articles/bsdl-gpl/article.html "Why you should use a BSD style license for your Open Source Project"]
 +
** BSD Licenses code is usually compatible with other open/closed code, when you want to mix them.
 +
** Example software projects licensed under the BSD License:
 +
*** Many Google Projects, including [https://developers.google.com/v8/ V8], [https://www.chromium.org/Home Chromium], [https://golang.org/ Go]
 +
*** [https://d3js.org/ D3.js]
 +
*** [https://www.djangoproject.com/ Django]
 +
*** [https://www.nginx.com/ nginx]
 +
*** [http://ex-vi.sourceforge.net/ Vi]
 +
** Summary:
 +
*** You need to retain the license and copyright notice
 +
*** You can use it commercially or non-commercially (privately)
 +
*** You can distribute it freely
 +
*** You can modify it freely
 +
 
 +
* Discussion of projects found for [[DPS909 & OSD600 Fall 2019 - Lab 1|Lab 1]]
 +
* [[DPS909 & OSD600 Fall 2019 - Lab 2|Lab 2]]
 +
* [[OSD & DPS909 Fall 2019 - Release 0.1|Release 0.1]] due Mon, Sept 23
 +
 
 +
== Week 3 ==
 +
 
 +
* '''Readings/Resources'''
 +
** Courses on [http://www.senecacollege.ca/lynda/ Lynda]
 +
*** [https://www.lynda.com/Git-tutorials/Git-Essential-Training/100222-2.html?srchtrk=index%3a0%0alinktypeid%3a2%0aq%3agit%0apage%3a1%0as%3arelevance%0asa%3atrue%0aproducttypeid%3a2 Git Essential Training]
 +
*** [https://www.lynda.com/Git-tutorials/Up-Running-Git-GitHub/409275-2.html?srchtrk=index%3a0%0alinktypeid%3a2%0aq%3agit%0apage%3a1%0as%3arelevance%0asa%3atrue%0aproducttypeid%3a2 Up and Running with Git and GitHub]
 +
** Books
 +
*** [http://git-scm.com/book Pro Git]
 +
*** [http://www.ericsink.com/vcbe/index.html Version Control by Example, online book]
 +
** References
 +
*** [http://gitref.org/ Git Reference]
 +
*** [http://marklodato.github.com/visual-git-guide/index-en.html Visual Git Reference]
 +
*** [http://sixrevisions.com/resources/git-tutorials-beginners/ Overview of Git Tutorials (many good ones)]
 +
*** [http://help.github.com/ Github documentation]
 +
*** [https://desktop.github.com/ GitHub Desktop]
 +
 
 +
* '''Introducing [http://git-scm.com/ git] and [https://github.com/ GitHub]'''
 +
** Content Addressable Filesystem and Snapshots
 +
** Distributed: Local vs. Remote development
 +
** .git directory
 +
** Content Integrity, SHAs (Secure Hash Algorithm)
 +
*** <code>git init</code>
 +
*** <code>echo 'test content' | git hash-object -w --stdin</code>
 +
*** <code>ls .git/objects</code>
 +
*** <code>git cat-file -p d670460b4b4aece5915caf5c68d12f560a9fe3e4</code>
 +
** Blobs, Trees, and Commits
 +
** Branches, <code>master</code>
 +
** Working Directory, Staging Area, Repository
 +
** What do these commands really do?
 +
*** <code>git clone url-to-git-repo</code>
 +
*** <code>git add file.txt</code>
 +
*** <code>git status</code>
 +
*** <code>git rm file.txt</code>
 +
*** <code>git commit -m "Added file.txt"</code>
 +
** Remotes, <code>origin</code>, <code>upstream</code>
 +
 
 +
* Filing and Fixing a bug: a cookbook approach
 +
** [https://help.github.com/articles/set-up-git/ set up git and GitHub]
 +
*** https://help.github.com/ has lots of great articles to help you.  You can also view [https://www.youtube.com/githubguides video guides] or read the [https://guides.github.com/ printed guides] 
 +
*** [https://help.github.com/articles/setting-your-username-in-git/ setup your username in git]
 +
*** [https://help.github.com/articles/setting-your-commit-email-address-in-git/ setup your email address in git]
 +
*** [https://help.github.com/articles/associating-text-editors-with-git/ specify which editor git should use], for example [https://stackoverflow.com/questions/30024353/how-to-use-visual-studio-code-as-default-editor-for-git?answertab=active#tab-top you can use vscode]
 +
*** [https://help.github.com/articles/dealing-with-line-endings/ setup line endings (CRLF vs. LF) in git], [https://www.edwardthomson.com/blog/git_for_windows_line_endings.html extra notes for Windows users] 
 +
*** [https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/ setup ssh keys for GitHub]
 +
** [https://help.github.com/articles/working-with-forks/ In GitHub, create a fork of the repo you want to work on]
 +
** [https://help.github.com/articles/cloning-a-repository/ On your computer, clone your forked repo]
 +
** [https://help.github.com/articles/adding-a-remote/ On your computer, add a remote named "upstream" for the original repo (vs. your fork)]
 +
** [https://help.github.com/articles/creating-an-issue/ On GitHub, find or create an Issue for the change you want to make]
 +
** [https://help.github.com/articles/about-branches/ On your computer, create and checkout a branch for your work, e.g., issue-1234 for Issue #1234]
 +
** [https://www.atlassian.com/git/tutorials/saving-changes On your computer, make code changes, test them, add, and commit on your branch.  Repeat as necessary.]
 +
** [https://help.github.com/articles/pushing-to-a-remote/ On your computer, push your changes (commits) to your fork (origin)]
 +
** [https://help.github.com/articles/creating-a-pull-request/ On GitHub, create a Pull Request for your changes to get sent to the upstream repo]
 +
** [https://www.youtube.com/watch?v=e41HPOHX9aE On your computer, fix any problems pointed out by your reviewer(s), add the file(s), commit, and push again to update your pull request]
 +
 
 +
* [[OSD & DPS909 Fall 2019 - Release 0.1|Release 0.1]] due Mon, Sept 23
 +
 
 +
== Week 4 ==
 +
 
 +
* Blogging
 +
** [https://dev.to/ladybug/why-blogging-is-awesome-127 Why Blogging is Awesome]
 +
** Keep reading the [http://zenit.senecac.on.ca/~chris.tyler/planet/ Planet], there are great posts there
 +
 
 +
* Learning Licenses: MIT
 +
** [https://choosealicense.com/licenses/mit/ MIT License]
 +
** [https://writing.kemitchell.com/2016/09/21/MIT-License-Line-by-Line.html The MIT License, Line by Line]
 +
** One of the most widely used licenses in Open Source
 +
** Like the BSD License, nothing about patents (created before software was patentable in the US)
 +
** Example software projects licensed under the MIT License:
 +
*** [https://expressjs.com/ ExpressJS]
 +
*** [http://rubyonrails.org/ Ruby on Rails]
 +
*** [https://angularjs.org/ AngularJS]
 +
*** [https://atom.io/ Atom], [https://electron.atom.io/ Electron]
 +
*** [http://getbootstrap.com/ Bootstrap]
 +
*** [https://nodejs.org/ node.js]
 +
*** [https://github.com/photonstorm/phaser Phaser]
 +
*** [https://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY]
 +
*** [https://socket.io/ Socket.IO]
 +
** "Do Good" forks of MIT:
 +
*** [https://spdx.org/licenses/JSON JSON License] with a [https://gramblingsofagal.blogspot.com/2018/04/json-and-good-not-evil.html great overview and history here.]
 +
*** [https://firstdonoharm.dev/ Hippocratic License]
 +
*** Recent situation with [https://github.com/sethvargo/chef-sugar Chef-Sugar], [https://www.theregister.co.uk/2019/09/20/chef_roasted_for_ice_dealings/ Chef and ICE Contract].  [https://www.theregister.co.uk/2019/09/23/chef_ice_u_turn/ Update from today]
 +
 
 +
* More Git
 +
** [https://wiki.cdot.senecacollege.ca/wiki/DPS909_%26_OSD600_Fall_2017_-_Git_Walkthrough Git Walkthrough Part I]
 +
** [[DPS909 & OSD600 Winter 2017 - Git Walkthrough 2| Git Walkthrough Part II]]
 +
** Upstream and keeping your <code>master</code> branch up-to-date
 +
 
 +
* [[OSD & DPS909 Fall 2019 - Release 0.1|Release 0.1]] due Mon, Sept 23.  Any issues you need help with?
 +
* [[OSD & DPS909 Fall 2019 - Release 0.2|Release 0.2]]
 +
* [[DPS909 & OSD600 Fall 2019 - Lab 3|Lab 3]]
 +
* [https://www.startupopenhouse.com/edition/5d4b38f82a1e660010743c67?displayMode=map Startup Open House Event Tonight, Thurs Sept 26 4-8]
 +
 
 +
== Week 5 ==
 +
 
 +
* Forking vs. Merging
 +
** Anyone can fork, not everyone can get work merged back in
 +
** [https://hueniverse.com/my-repo-my-house-my-rules-1b2e860914d4 My Repo: my house my rules]
 +
** Some famous Forks
 +
*** Firefox from Mozilla Suite
 +
*** WebKit from KDE's KHTML
 +
*** Blink from WebKit
 +
*** Ubuntu from Debian
 +
*** Sun's StarOffice became OpenOffice became LibreOffice
 +
*** WordPress from Cafelog
 +
*** MariaDB from MySQL
 +
*** FireOS (Amazon for Kindle) from Android
 +
*** io.js from node.js, which eventually became the official node.js
 +
** Example Fork
 +
*** [https://github.com/Semantic-Org/Semantic-UI Semantic UI]
 +
*** [https://github.com/fomantic/Fomantic-UI Fomantic UI] - "Fomantic was created to continue active development of Semantic-UI and has the intent to be merged back into the master repository once active development can restart."
 +
 
 +
* 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>
 +
** Merge Conflicts
 +
*** Conflict markers <code><<<<<<<<<</code>, <code>=============</code>, <code>>>>>>>>>>>>></code>
 +
** [https://blog.humphd.org/fearless-merges/ Doing big merges in git]
 +
 
 +
* TODO
 +
** [https://github.com/RyanWils/my-note Merging 3 PRs example]
 +
** [[OSD & DPS909 Fall 2019 - Release 0.2|Release 0.2]]
 +
** Lab 4 - Complete your first Hacktoberfest PR, and write your first blog post about your fix.  See guidelines in the [[OSD & DPS909 Fall 2019 - Release 0.2|Release 0.2]] page.  Place both links in a new section under the Submission section.
 +
 
 +
== Week 6 ==
 +
 
 +
* 0.2 Updates
 +
** How's it Going?
 +
*** Things I read in your blog posts:
 +
**** Setting up projects takes time, research (Docker, Gatsby, Makefile, Gems, npm builds etc)
 +
**** Trouble running projects
 +
**** Watch Windows line ending issues
 +
**** Need to fix things the way the project wants vs. how you want
 +
**** Include links in your blog posts when you talk about things
 +
** Interesting projects you've found?
 +
** Stats for Week 1
 +
*** 44 PRs: +3,358/-941 lines of code across 178 files in 37 repositories
 +
*** 19 have already been merged
 +
*** 21 people didn't get Lab 1 done (no PR/blog)
 +
 
 +
* <code>git commit --amend</code>
 +
** Add to, correct, or otherwise alter your previous commit and/or comment message
 +
** Use <code>--no-edit</code> to leave the commit message alone
 +
 
 +
* <code>git rebase branch</code>
 +
** Replay commits on a new base branch/commit
 +
** Process goes like this:
 +
*** git finds a common ancestor commit of the branch you're on, and the one you're rebasing onto
 +
*** git calculates DIFFs for each, saves them to disk
 +
*** git checks out the commit you want to branch onto, and begins to replay those diffs one by one
 +
*** if there is a merge conflict, the rebase pauses so you can fix things
 +
*** use <code>git rebase --continue</code> or <code>git rebase --abort</code> to move forward after such a pause
 +
*** use <code>git rebase --skip</code> to ignore the current commit and keep going
 +
** Never rebase commits that are shared publicly in another repo.  Only do it on commits you own locally (e.g., a topic branch you are working on)
 +
** Don't use rebase to get rid of commits in a public branch, use <code>git revert commit-sha</code> instead to apply an inverse commit
 +
** If you rebase a branch you've pushed (e.g., for a pull request), when you push, use <code>git push origin branch-name -f</code> (f means force and will overwrite)
 +
** <code>git rebase -i</code> for interactive rebase
 +
*** shows a script of all commits in reverse order (order they will be replayed).  You can hand edit this to remove, re-order, or combine commits
 +
** You can squash on the same branch by rebasing on <code>HEAD~n</code> where n is how many commits back from HEAD to go
 +
 
 +
* <code>git cherry-pick SHA</code> to add a commit to the current branch
 +
 
 +
== Week 7 ==
 +
 
 +
* Continue working on 0.2
 +
** Discussion of any issues/questions you have
 +
** End of Week 2 Stats:
 +
*** +15,819/-8,733 LOC in 414 files across 116 PRs to 89 Repos.  62 merged (53%) already
 +
** Interesting stories from PR #2
 +
*** [https://neilong31.wordpress.com/2019/10/13/2nd-issue-hacktober-fest/ Neil Ong]
 +
*** [https://grommers.wordpress.com/2019/10/12/an-enviromental-git/ James Inkster]
 +
*** [https://hmcildoon.wordpress.com/2019/10/12/hacktoberfest-week-2/ Hayley McIldoon]
 +
*** [https://klopez8.blogspot.com/2019/10/hacktoberfest-issue-2-pull-requesrt-2.html Krystyna Lopez] and [https://juliephilipjames.wordpress.com/2019/10/14/my-second-pull-request-for-hacktoberfest/ Julie James]
 +
*** [https://whataboutopensource.blogspot.com/2019/10/hacktoberfest-enhancement.html Josue Quilon Barrios]
 +
 
 +
* Open Source Case Study: Visual Studio Code
 +
** https://code.visualstudio.com/
 +
** https://github.com/Microsoft/vscode
 +
** https://en.wikipedia.org/wiki/Visual_Studio_Code
 +
** Technologies
 +
*** [https://electronjs.org/ Electron]
 +
*** [https://microsoft.github.io/monaco-editor/ Monaco Editor]
 +
*** [https://www.typescriptlang.org/ TypeScript]
 +
*** [https://xtermjs.org/ xterm.js]
 +
*** node.js, express, and hundreds of JavaScript modules
 +
** Looking for Contribution Opportunities in Dependencies
 +
*** <code>yarn</code>
 +
*** Look at <code>node_modules</code> and examine the projects and issues (955 deps)
 +
*** Are there any bugs we could fix?
  
* First open technologies and projects we'll be using:
+
* Fixing a Bug in VSCode Walkthrough:
** [https://github.com/nodejs/node node.js]
+
** https://github.com/humphd/vscode/tree/good-first-experience-issue-42726#walkthrough-fixing-a-bug-in-visual-studio-code
** [https://nodejs.org/api/fs.html node fs module docs]
 
** [https://github.com/filerjs/filer filer]
 
** [https://mochajs.org/ mocha]
 

Latest revision as of 11:58, 16 October 2019

Week 1

  • Course introduction
  • Labs
    • Weekly labs, typically done in class
    • Labs are due on the Friday of the week they are assigned by midnight
    • Marked using Pass/Fail scheme
    • All labs must be completed to pass the course
    • Lab 1 is available now
  • Releases
    • 4 releases, some with multiple bugs/PRs required, including participating in Hacktoberfest 2019
    • Due Dates: Sept 20, Oct 31, Nov 20, Dec 6
    • Chance to work on real code, real projects
    • Big learning curve, lots of time required
    • Amazing chance to gain experience, network, build your skills and resume
    • Work with new and emerging technologies, gain exposure to tech outside the classroom
  • Discussion/Readings
    • Copyright (Copyright in Canada video)
      • IANAL
      • Who created it, "owns" it.
      • Set of exclusive rights granted to the work's creator
      • "The right to copy," to produce or reproduce a work or substantial portion thereof
      • Copyright is automatic when a work is created, you don't have to register it.
      • Copyright in Canada
      • Copyright Guide
      • In a software project, there can be many copyright holders (e.g., many contributors), or all contributors may assign their copyright to the project (e.g., CLA, which we'll cover later)

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

  • Introducing git and GitHub
    • Content Addressable Filesystem and Snapshots
    • Distributed: Local vs. Remote development
    • .git directory
    • Content Integrity, SHAs (Secure Hash Algorithm)
      • git init
      • echo 'test content' | git hash-object -w --stdin
      • ls .git/objects
      • git cat-file -p d670460b4b4aece5915caf5c68d12f560a9fe3e4
    • Blobs, Trees, and Commits
    • Branches, master
    • Working Directory, Staging Area, Repository
    • What do these commands really do?
      • git clone url-to-git-repo
      • git add file.txt
      • git status
      • git rm file.txt
      • git commit -m "Added file.txt"
    • Remotes, origin, upstream

Week 4

Week 5

  • Forking vs. Merging
    • Anyone can fork, not everyone can get work merged back in
    • My Repo: my house my rules
    • Some famous Forks
      • Firefox from Mozilla Suite
      • WebKit from KDE's KHTML
      • Blink from WebKit
      • Ubuntu from Debian
      • Sun's StarOffice became OpenOffice became LibreOffice
      • WordPress from Cafelog
      • MariaDB from MySQL
      • FireOS (Amazon for Kindle) from Android
      • io.js from node.js, which eventually became the official node.js
    • Example Fork
      • Semantic UI
      • Fomantic UI - "Fomantic was created to continue active development of Semantic-UI and has the intent to be merged back into the master repository once active development can restart."
  • 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
    • Merge Conflicts
      • Conflict markers <<<<<<<<<, =============, >>>>>>>>>>>>
    • Doing big merges in git
  • TODO
    • Merging 3 PRs example
    • Release 0.2
    • Lab 4 - Complete your first Hacktoberfest PR, and write your first blog post about your fix. See guidelines in the Release 0.2 page. Place both links in a new section under the Submission section.

Week 6

  • 0.2 Updates
    • How's it Going?
      • Things I read in your blog posts:
        • Setting up projects takes time, research (Docker, Gatsby, Makefile, Gems, npm builds etc)
        • Trouble running projects
        • Watch Windows line ending issues
        • Need to fix things the way the project wants vs. how you want
        • Include links in your blog posts when you talk about things
    • Interesting projects you've found?
    • Stats for Week 1
      • 44 PRs: +3,358/-941 lines of code across 178 files in 37 repositories
      • 19 have already been merged
      • 21 people didn't get Lab 1 done (no PR/blog)
  • git commit --amend
    • Add to, correct, or otherwise alter your previous commit and/or comment message
    • Use --no-edit to leave the commit message alone
  • git rebase branch
    • Replay commits on a new base branch/commit
    • Process goes like this:
      • git finds a common ancestor commit of the branch you're on, and the one you're rebasing onto
      • git calculates DIFFs for each, saves them to disk
      • git checks out the commit you want to branch onto, and begins to replay those diffs one by one
      • if there is a merge conflict, the rebase pauses so you can fix things
      • use git rebase --continue or git rebase --abort to move forward after such a pause
      • use git rebase --skip to ignore the current commit and keep going
    • Never rebase commits that are shared publicly in another repo. Only do it on commits you own locally (e.g., a topic branch you are working on)
    • Don't use rebase to get rid of commits in a public branch, use git revert commit-sha instead to apply an inverse commit
    • If you rebase a branch you've pushed (e.g., for a pull request), when you push, use git push origin branch-name -f (f means force and will overwrite)
    • git rebase -i for interactive rebase
      • shows a script of all commits in reverse order (order they will be replayed). You can hand edit this to remove, re-order, or combine commits
    • You can squash on the same branch by rebasing on HEAD~n where n is how many commits back from HEAD to go
  • git cherry-pick SHA to add a commit to the current branch

Week 7