Download presentation
Presentation is loading. Please wait.
Published byれんか たつざわ Modified over 5 years ago
1
Patrick Cozzi University of Pennsylvania CIS 565 - Fall 2012
Source Control Primer Also called revision control or version control. Patrick Cozzi University of Pennsylvania CIS Fall 2012
2
Why Source Control? How do two people collaborate on the same code?
? Dropbox? How do two hundred people collaborate?
3
Why Source Control? How do we backup our code?
How do we change the same file? How do we get a history of changes?
4
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? Feature branches. Release branches.
5
Popular Tools P4 and SVN (subversion) are centralized. Git is distributed. Git is separate from github, but github is popular for hosting. Images from and
6
Centralized Server holds a centralized repository
Clients have a revision This follows P4. The server has the entire repository (depot in P4) including history. Clients have a local snapshot.
7
Centralized This follows P4
8
Centralized This follows P4 Submit
9
Centralized This follows P4
10
Centralized Get Latest Revision
11
Centralized Modify/add/remove files
Files can be read-only (P4) or not (SVN) Modify/add/remove files
12
Centralized Files can be read-only (P4) or not (SVN) Submit
13
Centralized Get Latest Revision
14
Distributed All machines have a full copy of the repository
Repositories can be cloned Repositories can be pushed to and pulled from other machines
15
Distributed git init // Add files to directory git add *
git commit –a –m ‘<description>’ Create a local repo Locally commit changes
16
Distributed Clone a remote repo
git clone Clone a remote repo
17
Distributed git commit –a –m ‘<description>’
Locally commit changes
18
Distributed git push Push changes to other repos
19
Distributed git pull Pull changes from other repos
20
Summary We are using git this semester - distributed source control
Use source control for everything, not just code The initial pain will pay dividends for the rest of the semester and your career. Learn the command line, then use GUIs if desired.
21
Git Resources Create initial account - https://github.com/signup
Get an edu account - Setup git - Guide - Cheat sheet - Join CIS
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.