Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS4961 Software Design Laboratory I Collaboration using Git and GitHub

Similar presentations


Presentation on theme: "CS4961 Software Design Laboratory I Collaboration using Git and GitHub"— Presentation transcript:

1 CS4961 Software Design Laboratory I Collaboration using Git and GitHub
Chengyu Sun California State University, Los Angeles

2 Prerequisites Basic version control concepts
Common Git operations: commit, branch, merge Common GitHub (i.e. remote Git repository) operations: clone, push, pull Pro Git, Chapter

3 Collaboration Models Different ways a team of developers collaborate on a project Centralized De-centralized

4 Developer (Team Leader)
Centralized Model Remote Repository Local Repository Local Repository Local Repository Working Copy Working Copy Working Copy Developer Developer (Team Leader) Developer

5 About Centralized Model
Each developer work on their own branches A team leader is in charge of the important branches (e.g. master) Changes can be copied between branches using merge/rebase Similar to using a centralized VCS

6 Problems of Centralized Model
All developers need write access to the same repository Repository “collaborators” on GitHub Infeasible for project with lots of contributors One inexperienced/malicious developer could mess up the whole repository

7 Developer (Team Leader)
De-Centralized Model GitHub Pull Requests Official Repository Remote Repository Remote Repository Local Repository Local Repository Local Repository Working Copy Working Copy Working Copy Developer (Team Leader) Developer Developer

8 About De-Centralized Model
Each developer work with their own remote repository A team leader maintains the “official” project repository Changes can be shared using Git remote operations or GitHub Pull Requests The more “git way” of collaboration

9 Collaboration Example
De-centralized model Exchange changes using GitHub Pull Requests Developer Role Environment senturain Team Leader Command line cysun Team Member Eclipse

10 1. Put Project on GitHub Team leader creates the project and a local repository, then push the local repository to GitHub GitHub Local Team Leader

11 2. Fork Project on GitHub Team member forks the project on GitHub Fork
Local Team Leader Team Member

12 3. Clone the Project to Local Repository
Team member clones the project, then imports it into Eclipse GitHub Local Team Leader Team Member

13 4. Pull Request from Member to Leader
Team member commits & pushes changes to his/her GitHub repo, then creates a Pull Request to notify the team leader about the changes Team leader accept the pull request and merges the changes into the team repository Pull Request GitHub Local Team Leader Team Member

14 5. Pull Request from Member to Him/Herself
It’s usually the responsibility of each project member to keep their repository in sync with the official repository Team member can create a Pull Request to him/herself Pull Request GitHub Local Team Leader Team Member


Download ppt "CS4961 Software Design Laboratory I Collaboration using Git and GitHub"

Similar presentations


Ads by Google