Download presentation
Presentation is loading. Please wait.
Published byIra Hood Modified over 9 years ago
1
Source Control Primer Patrick Cozzi University of Pennsylvania CIS 565 - Spring 2012
2
Why Source Control? How do two people collaborate on the same code? Email? Dropbox?
3
Why Source Control? How do two people collaborate on the same code? Email? Dropbox? How do two hundred people collaborate?
4
Why Source Control? How do we backup our code? How do we get a history of changes?
5
Why Source Control? How do we make big or risky code changes without affecting the stable version? How do we work on new versions and still support old versions?
6
Popular Tools Images from https://twitter.com/perforce, http://alagazam.net/, and https://twitter.com/GitHubhttps://twitter.com/perforcehttp://alagazam.net/https://twitter.com/GitHub
7
Centralized Server holds a centralized repository Clients have a revision
8
Centralized
9
Submit
10
Centralized
11
Get Latest Revision
12
Centralized Modify/add/remove files
13
Centralized Submit
14
Centralized Get Latest Revision
15
Distributed All machines have a full copy of the repository Repositories can be cloned Repositories can be pushed to and pulled from other machines
16
Distributed Create a local repo Locally commit changes git init // Add files to directory git add * git commit –a –m ‘ ’
17
Distributed Clone a remote repo git clone git@github.com:CIS565-Spring-2012/cis565testHomework.git
18
Distributed Locally commit changes git commit –a –m ‘ ’
19
Distributed Push changes to other repos git push
20
Distributed Pull changes from other repos git pull
21
Summary We are using git this semester - distributed source control Use source control for everything, not just code
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.