2. About Me
• Lorna Jane Mitchell
• http://lornajane.net
• PHP Consultant/Developer
• Open Source project lead http://joind.in
• Occasional writer/speaker
• Twitter: @lornajane
2
9. Subversion
Recommended centralised solution
Project is now an Apache Software Foundation project. From the mission
statement:
Subversion exists to be universally recognized and adopted as an
open-source, centralized version control system characterized by its
reliability as a safe haven for valuable data; the simplicity of its model and
usage; and its ability to support the needs of a wide variety of users and
projects, from individuals to large-scale enterprise operations.
http://lwn.net/Articles/381794/
7
16. Snapshots vs Changesets
A revision number describes a set of patches. Not a state of code.
With distributed version control, the distributed part is actually not the
most interesting part. The interesting part is that these systems think in
terms of changes, not in terms of versions
http://www.joelonsoftware.com/items/2010/03/17.html
14
18. Branching on Distributed Systems
• Can branch any repo
• Branches can be private
• Merge commits from other branches on local repo
15
19. Working with Branches: Creating
$ git branch api
$ git branch
api
* master
$ git checkout api
Switched to branch 'api'
$ git branch
* api
master
16
20. Working with Branches: Using
$ mkdir api
$ vim api/index.php
$ git add api/
$ git commit -m "added the web service"
[api 62582e1] added the web service
1 files changed, 4 insertions(+), 0 deletions(-)
create mode 100644 api/index.php
$ ls
api
website
17
21. Working with Branches: Switching
$ git checkout master
Switched to branch 'master'
$ ls
website
18
23. Timelines
• Commits keep their timestamps
• They show at the time they were commited
• To a repo
• Not when they were merged to this one
• Tools help illustrate
20
24. Timelines: git log –oneline
be81f69 Merge branch 'master' of git://github.com/joindin/joind.in
a67dabb Merge commit 'fentie/issue91'
526039d Merge commit 'jaytaph/JOINDIN-38-2'
0bc1a57 merge of hatfieldje/feature/JOINDIN-100
d3c7195 Added slide icon to talk-list
983d1a0 Fixed dates in CfP display and talk add/edit
4edf8be Merge commit 'justincarmony/JOINDIN-97'
bec3ac1 Moving the settings from the method to the Controller's member
01d3feb Admins can approve other admins
31ba4c1 Added counter to Event Claims link
ce2e46b Updated README. Includes instructions for enabling RewriteEngi
ce356d5 Corrected session type dropbox
9c2f645 Merge commit 'justincarmony/74-howto-block'
0ce1551 Merge remote-tracking branch 'jaytaph/JOINDIN-104'
21
25. Timelines: git log –graph –oneline
* be81f69 Merge branch 'master' of git://github.com/joindin/joind.in
|
| * a67dabb Merge commit 'fentie/issue91'
| |
| | * 2b229ef IDE removing extra EOL whitespace
| | * 82b3aa7 switching to single empty test instead of !isset and fal
| | * b03d6df adding check to ensure speakers cannot rate their own ta
| * | 526039d Merge commit 'jaytaph/JOINDIN-38-2'
| |
| | * | 01d3feb Admins can approve other admins
| | * | 31ba4c1 Added counter to Event Claims link
| * | | 0bc1a57 merge of hatfieldje/feature/JOINDIN-100
| |
| | * | | 983d1a0 Fixed dates in CfP display and talk add/edit
| | * | | 0ddfd83 JOINDIN-100
| | * | | d00e1f3 feature/JOINDIN-100
| | * | | f5a5775 feature/JOINDIN-100
| * | | | d3c7195 Added slide icon to talk-list
22
27. GUI Tools
Most OS/DVCS combinations covered
• IDE plugins
• Versions on OS X for SVN
• Tower on OS X for git
• Tortoise* for Windows users
• git and windows not recommended
• CLI on every platform
24
28. Bridging the Gap
Bridges: local DVCS functionality with centralised repos
Tools:
• git-svn
• bzr-svn
• hg-git
• and more
25
30. Supporting Distributed Workflows
Need to keep track of:
• Commits on other repos
• Relationships between repos
• Patches (pull requests)
Often: source browsing, documentation and issue trackers are also
included
26
31. Collaboration Sites
• Git
• Github http://github.com/
• Gitorious http://gitorious.org/
• Mercurial
• Bitbucket http://bitbucket.org/
• Bazaar
• Launchpad http://launchpad.net/
Also Sourceforge who support all of the above and more http://sf.net
27