diff options
Diffstat (limited to 'spm-slides.tex')
-rw-r--r-- | spm-slides.tex | 122 |
1 files changed, 67 insertions, 55 deletions
diff --git a/spm-slides.tex b/spm-slides.tex index d18db3d..6296dec 100644 --- a/spm-slides.tex +++ b/spm-slides.tex @@ -664,6 +664,73 @@ Copyright (C) 2020 Lan Hui %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\foilhead{Version (revision) Control System} + +The core of version control is \underline{change management}: who made which change on which date. + +Two models: + +\begin{enumerate} +\item Lock-Modify-Unlock +\item Copy-Modify-Merge +\end{enumerate} + +{\bf commit} - make change to the project. "I just committed a fix for the server crash bug people have been reporting on Mac OS X. Jay, could you please review the commit and check that I'm not misusing the allocator there?" + +{\bf push} - publish a commit to a publicly online repository. + +{\bf pull} (or update) - pull others' changes (commits) into your copy of the project. + +{\bf commit message} or log message - commentary attached to each commit, describing the nature and purpose of the commit. + +{\bf repository} - a database in which changes are stored and from which they are published. + +{\bf clone} - obtain one's own development repository by making a copy of the project's central repository. My fork. + +{\bf checkout} - switch to a branch + +{\bf revision or commit} - "Oh yes, she fixed that in revision 10" or "She fixed that in commit fa458b1fac". + +{\bf diff} - textual representation of a change. + +{\bf tag or snapshot} - Release\_1\_0, Delivery\_20130630. + +{\bf branch} - a copy of the project, under version control but isolated so that changes made to the branch don't affect other branches of the project. A great way to have multiple, independent lines of development. ``main line'', ``trunk'', ``master'', ``release branch''. + +{\bf merge} - move a change from one branch to another. + +{\bf conflict} - when two people try to make different changes to the same place in the code. ``resolve'' the conflict. + +{\bf revert} - undo an already-committed change to the software. + +What files should be put under version control? + + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\foilhead{Choosing a version control system} + +Git and Github. +% https://ben.balter.com/2014/11/06/rules-of-communicating-at-github/ + +https://www.mercurial-scm.org + +https://subversion.apache.org + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\foilhead{Version everything} + +Any piece of information worth writing down is worth versioning \underline{in one place}. + +Source code, web pages, documentation, FAQ, design notes. + +Don't keep \underline{programmatically generated files} under version control. + +Things that don't change should be archived. For example, emails. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \foilhead{Refactoring Old Code and Building Upon It} @@ -2212,61 +2279,6 @@ Thread support Searchability -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\foilhead{Version (revision) Control System} - -The core of version control is \underline{change management}: who made which change on which date. - -{\bf commit} - make change to the project. "I just committed a fix for the server crash bug people have been reporting on Mac OS X. Jay, could you please review the commit and check that I'm not misusing the allocator there?" - -{\bf push} - publish a commit to a publicly online repository. - -{\bf pull} (or update) - pull others' changes (commits) into your copy of the project. - -commit message or log message - commentary attached to each commit, describing the nature and purpose of the commit. - -repository - a database in which changes are stored and from which they are published. - -clone - obtain one's own development repository by making a copy of the project's central repository. My fork. - -checkout - switch to a branch - -revision or commit - "Oh yes, she fixed that in revision 10" or "She fixed that in commit fa458b1fac". - -diff - textual representation of a change. - -tag or snapshot - Release\_1\_0, Delivery\_20130630. - -branch - a copy of the project, under version control but isolated so that changes made to the branch don't affect other branches of the project. ``main line'', ``trunk'', ``master'', ``release branch''. - -merge - move a change from one branch to another. - -conflict - when two people try to make different changes to the same place in the code. ``resolve'' the conflict. - -revert - undo an already-committed change to the software. - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\foilhead{Choosing a version control system} - -Git and Github. -% https://ben.balter.com/2014/11/06/rules-of-communicating-at-github/ - -https://www.mercurial-scm.org - -https://subversion.apache.org - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\foilhead{Version everything} - -Any piece of information worth writing down is worth versioning \underline{in one place}. - -Source code, web pages, documentation, FAQ, design notes. - -Don't keep \underline{programmatically generated files} under version control. - -Things that don't change should be archived. For example, emails. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |