Presentation is loading. Please wait.

Presentation is loading. Please wait.

GitHub and Git.

Similar presentations


Presentation on theme: "GitHub and Git."— Presentation transcript:

1 GitHub and Git

2 GitHub & Git Basics Introduction to Git
Understanding the state of your repository Being selective with Git Inside a commit

3 Git basics (a.k.a. ‘the internals’)

4 Git is a version control system
A tool that lets you track your progress over time. Basics

5 Git takes snapshots Save snapshots to your history to retrace your steps. Also keeps others up-to-date with your latest work. Basics

6 Centralized systems require coordination…
Basics

7 Order with coordination:
In a centralized system, you can objectively call versions a numerical progression: version 1 , version 2, version 3… Since John made a new version before Vanessa, his is n+1, and Vanessa is n+2. Basics

8 Working in parallel: order without coordination
Git goes after this idea of distributed version control, so you can keep track of your versions without coordination. Basics

9 GitHub Hosts your repositories Track your progress
Social features to enable collaboration Individual assignments

10 Let’s create a repository in GitHub!

11 Let’s set up a place to host your code
A repository on GitHub! Individual assignments

12 Basic s

13 A repository holds the entire history of your project
A repository is the unit of separation between projects in Git. Each project, library or discrete piece of software should have it's own repository. Basics

14 Making commits ‘git commit’
tells Git to save that portion of the project from the staging area into the repository history. ‘git commit’ ‘git commit’ Basics

15 Now: editing in the GitHub UI (not recommended)

16 Fetch Individual assignments
I’d like the commits I don’t already have, please. Individual assignments

17 Fetch git fetch Thanks! Individual assignments

18 The GitHub Flow

19 Branch git checkout -b authenticate Group work

20 Commit Group work git checkout -b authenticate git commit -m ‘add
OAuth handshake’ Group work

21 Dr. Root distributes a group exercise
Ok Team 1, here is a shared repository with starter code for your group exercise. github.com/ Software-engineering/team-1-setup Group work

22 Push to remote Group work git checkout -b authenticate git commit
-m ‘add OAuth handshake’ --set-upstream git push origin authenticate Group work

23 Pull request Group work git checkout -b authenticate git commit
-m ‘add OAuth handshake’ --set-upstream git push origin authenticate Group work

24 Review ” Looks good to me!” “Missed a semi- colon :)” Group work
git checkout -b authenticate ” Looks good to me!” git commit -m ‘add OAuth handshake’ --set-upstream git push origin authenticate “Missed a semi- colon :)” Group work

25 Merged! Group work git checkout -b authenticate git commit -m ‘add
OAuth handshake’ --set-upstream git push origin authenticate Group work

26 Pull requests Technically: merge one branch into another branch in the repository’s history Pedagogically: peer discussion and feedback Group work

27 Clone a repository We’ve used the clone method to make a copy of a repository from GitHub.com to your local machine Clone sets up a sync between local and remote Use the either the web UI or the HTTPS methods on the repository page. Group work

28

29 Fork a repository Copy of a project that is always associated with the base project. Always discoverable, not private. Proposing ideas to a project you do not have access to. Closer to the open source workflow—used to propose new ideas on a project you don’t necessarily own Group work

30 may the Force be with you


Download ppt "GitHub and Git."

Similar presentations


Ads by Google