name: inverse layout: true class: center, middle, inverse --- #Version control in practice --- wcornwell.github.io --- layout: false .left-column[ ## What is version control? ] .right-column[ - A temporal filing cabinet for research projects - A collaborative tool (with both others and your "future self") - Directional (but reversible) research .red[*]
.footnote[.red[*] Not on auto-pilot; you have to think to use it!] ] --- layout: false .left-column[ ## What are the advantages? ] .right-column[ - Backup and restore (from the cloud) - Synchronize among multiple computers/users - Long- (or short-) term undo - Track changes, ownership, and allocate ~~blame~~ credit - Record your own logic - Works nicely with remote servers (Katana or Amazon) - Distribute science: code, manuscripts, and data - Built for collaborations - Also very useful for forgetful scientists ] --- layout: false .left-column[ ## What are the dis-advantages? ] .right-column[ - It's a bit annoying to learn - Once you learn it's 30 seconds at the beginning of the work session and the end of the work session ] --- ## A temporal filing cabinet of hidden files
All that you see on your computer is the current (hopefully best) version, but everything is saved in an organized way --- ## Standard workflow
--- ## Cloud respositories
- People who offer cloud git respositiories: [Github](http://www.github.com), Bitbucket, UNSW - Different bells and whistles among repositories --- layout: false .left-column[ ## Version control in practice: establish linked repositories ] .right-column[ - Locally do everything in bash (=shell).red[*]; on the web it's all push buttons - Create a repository: *git init* or push buttons on webpage - Connect repositories: *git clone* or push buttons on webpage .footnote[.red[*] GUI's are ~~coming~~ here but I don't know how to use them] ] --- layout: false .left-column[ ## Version control in practice: Normal work flow ] .right-column[ 1. *git pull* 2. DO SOMETHING USEFUL 3. STOP AT A LOGICAL STOPPING POINT FOR YOUR WORK 4. *git add . 5. *git commit -m "informative commit message describing what you did and why"* 6. *git push* .footnote[.red[*] Git pull not necessary if it's only you (on only one computer) working on something] ] --- layout: false .left-column[ ## Limitations (probably for the next 5 years or so) ] .right-column[ 1. Big data files are tricky at the moment.red[*] 2. ~~No GUI so some learning required for collaborations~~ 3. Binary files--files that cannot be opened in a text editor (.docx, .xlsx, .pptx, and others)--aren't that great with version control 4. Multi-person work flow is a seperate problem from version control--you still need to talk to each other .footnote[.red[*] github has a brand new service for this but I haven't used it] ] --- layout: false .left-column[ ## Two other useful commands ] .right-column[ -*git status* -*git diff* ] --- layout: true class: center, middle, inverse #That's it. ---