14

Click here to load reader

Source code management

Embed Size (px)

Citation preview

Page 1: Source code management

Source Code Management

Widoyo<[email protected]>

Page 2: Source code management

Agenda

Software CharacteristicSoftware ChangesTraditional MethodVersion ControlDistributed Version ControlCentralized Version ControlBranchingCommon Term in SCMDaily use of git

Page 3: Source code management

Software Characteristic

Software running well on a certain conditionSoftware are easy to breakSoftware are easy to modifySoftware are an abstract things Bugs may be found at later time

Page 4: Source code management

Software Changes

New FeaturesFound BugsEnvironment changesRequest to change

Page 5: Source code management

Traditional Method

Save into New name or Save the old one into archive nameMaking new directory to hold the old oneProblems:

No standard way to log changes Difficult to identify which the fresh (newest) one More complicated when working on Team

coba-asli.php/aplikasi-v1//aplikasi-v2/mycode-060908.rbmycode-020908.rb

Page 6: Source code management

Version Control

To log changesTo prevent overwriting each otherTo tag a set of software code, release codeAs a code repository

Page 7: Source code management

Centralized Version Control

Code repository are reside on a central placeIdeal for Team that working on the same projectProduct examples:

Concurrent Version System (CVS)Subversion (SVN)Source Safe?

Page 8: Source code management

Distributed Version Control

Repository are placed any whereIdeal for individual developer or small projectProduct examples (most of them are centralized too):

GIT BazaarMercurical

Page 9: Source code management

Branching

a line of development that exists independently of another line, yet still shares a common history

Page 10: Source code management

Common Term in SCM

Repository --Storage of current and historical codeCheck-in / Commit -- commit changes, write logCheck-out -- getting the sourceBranch -- making different line of developmentConflict, Resolve --changes are made on the same sourceBaseline, Trunk, Master -- Main line of developmentTag -- labeling snapshot of sourceLog --notes given by developer on changesHead -- the most recent commitRevision, Version --state at point in time Import -- copying local directory tree into repositoryExport --similar to checkout without metadata ofversion control

Page 11: Source code management

Daily Use of GIT

Initiate repositoryimport project (file(s) or Directory)checkoutcode - test iterationCommit - writing logs hereTag - labelingBranchMergeLogDiff

Page 12: Source code management

Starting Using git

Install, ONLY available on Linux:(Write your codeInitiate RepositoryAdd your code into repocode-compile-testCommit the changesTagand ... JUST Use it!

Page 13: Source code management

< 10 minutesgit show

my hello Project

Page 14: Source code management

Further Reading

http://www.kernel.org/pub/software/scm/git/docs/

Thank you