GitHub usage pattern example: 2048
![](/softdev2-resources/images/version-control/github-2048-orig.png)
So many variants!
![](/softdev2-resources/images/version-control/github-2048-doge.png)
2048 GitHub page
![](/softdev2-resources/images/version-control/github-2048-gabri-0.png)
2048 GitHub page
![](/softdev2-resources/images/version-control/github-2048-gabri-1.png)
What’s forking ??
![](/softdev2-resources/images/version-control/fork-plate-spagetti.jpg)
Stealing from their plate?
![](/softdev2-resources/images/version-control/forkintheroad.jpg)
More like a fork in the road.
GitHub encourages social computing
Common GitHub usage pattern: fork & modify
- Fork (clone) someone’s project into your account
- Modify and make it your own
- Share with original project through “pull requests”
Our GitHub usage pattern: push & pull
- Several users collaborate on same repo
- Open GitHub account and we associate you with private project repos
- Install local client
git
on Windows, Mac, Linux - Clone the repo on your local computer (don’t fork on GitHub!)
- Modify, then push and pull
- Communicate your pushes with your teammates!
- (Optional) Make branches and switch between them
An improved Git workflow: Integration Manager
![](/softdev2-resources/images/version-control/git-scm-workflow-integ-mgr.png)
Can we adopt features from integration manager?
Yes!
- Use branches
- Send pull requests (PRs) within the same repo
- Have someone to review code and accept PR
Ultimate Git workflow: Benevolent Dictator
![](/softdev2-resources/images/version-control/git-scm-workflow-benevolent-dictator.png)
A branching model: gitflow
![](/softdev2-resources/images/version-control/git-branching-model-1.png)