Post on 07-May-2015
description
Code Management:
Git
Thong Kuah<Thong.Kuah @ gmail.com>
A Coders Carolpresentspresents
Crash Dummy Coding
http://www.flickr.com/photos/bugbbq/3853099883/sizes/l/
New version
Here's another change
And another change
I prefer the first one
http://www.flickr.com/photos/jemimagibbons/3973603289/
Hey! Success!
http://www.flickr.com/photos/brajeshwar/378641553/
Teamwork ?
http://www.flickr.com/photos/ivanwalsh/3924222303/
cat_generator.sh
That's mine! Mine!
http://www.flickr.com/photos/9588236@N02/1454642584/sizes/l/
I know!
cat_generator.bakcat_generator.backup_filecat_gen.do_not_deletecat_generator.alice.1cat_generator.bob.2
N^2
http://www.flickr.com/photos/seeminglee/2065927225/
Marty McFly
http://commons.wikimedia.org/wiki/File:BTTFTimelines.png
http://www.flickr.com/photos/flying_cloud/2667225198/sizes/l/
http://www.flickr.com/photos/torley/414120961/sizes/o/
Fix it.
http://commons.wikimedia.org/wiki/File:Software_spanner.png
Who dunnit?http://www.flickr.com/photos/editor/3577065653/
Where's the problem?
http://www.flickr.com/photos/silvery/2414538926/
Re-occurences
http://www.flickr.com/photos/tveskov/3387394098/sizes/o/
So, what do we need ?
http://www.flickr.com/photos/mattwright/1787856/sizes/l/
http://www.flickr.com/photos/clintjcl/2784231777/sizes/o/
http://commons.wikimedia.org/wiki/File:Arrows-orphan.svg
Version Control
Version Control
●Storage●Keeps multiple versions
●Handles changes from multiple sources
Experiments
Deploy to production
Run multiple versions
Work with others
http://en.wikipedia.org/wiki/File:Revision_controlled_project_visualization-2010-24-02.svg
Version Control
Basics
Basics
●You get code●You change code●You share your changes
Basics
●You checkout●You change code●You commit
Basics
●You checkout
Checkout
http://betterexplained.com/articles/a-visual-guide-to-version-control/
Basics
●You checkout●You change code
Change code
...change file... http://betterexplained.com/articles/a-visual-guide-to-version-control/
Basics
●You checkout●You change code●You commit
Commit
http://betterexplained.com/articles/a-visual-guide-to-version-control/
Again?
Checkout
http://betterexplained.com/articles/a-visual-guide-to-version-control/
Change code
...change file... http://betterexplained.com/articles/a-visual-guide-to-version-control/
Commit
http://betterexplained.com/articles/a-visual-guide-to-version-control/
Every version is recorded
http://betterexplained.com/articles/a-visual-guide-to-version-control/
Every change is recorded
http://betterexplained.com/articles/a-visual-guide-to-version-control/
Basics (II)
●Others get your code●Others change code●You get new version
Basics (II)
●Others checkout●Others change code●You update
Basics (II)
●Others checkout●Others change code●You update●And around it goes
Sharing is good
http://www.flickr.com/photos/ryanr/142455033/sizes/o/
The full picture
Tools&
Practices
Tools
●SVN●Git●Mercurial●etc...
Practice is up to you & your team
http://www.flickr.com/photos/st3f4n/3752994778/ http://www.flickr.com/photos/ahnmyrrh/3633346069/
Summary
●Version Control is a must●Use best practice●Use good tools●Version control basics
Further Information
● http://gitref.org/index.html● http://progit.org/● SVN Red Book● http://betterexplained.com/articles/a-visual-
guide-to-version-control/● http://www.swc.scipy.org/lec/version.html
Credits, Attribution● http://www.flickr.com/photos/charlieferrari/49323751/sizes/o/
● http://www.flickr.com/photos/nickwheeleroz/2475011402/sizes/l/
● http://www.flickr.com/photos/herzogbr/2123789106/sizes/l/
● http://www.flickr.com/photos/7506006@N07/513417996/in/set-72157600264508078/
● http://www.flickr.com/photos/7506006@N07/513453021/
● http://www.flickr.com/photos/mattwright/1787856/sizes/l/
● http://www.flickr.com/photos/ryanr/142455033/sizes/o/
● http://www.flickr.com/photos/rachelrusinski/533767098/sizes/o/
● http://commons.wikimedia.org
● http://www.flickr.com/photos/missmirr/529688823/sizes/o/
Questions?
http://www.flickr.com/photos/gattomimmo/318700028/sizes/o/
Git
Workshop timeAsk lots of questions
http://github.com/kuahyeow/git-
workshop