git & github

18
Author: Cuong Ngo TerraLogic Inc

Upload: cuong-manh

Post on 15-Apr-2017

72 views

Category:

Engineering


0 download

TRANSCRIPT

Page 1: Git & GitHub

Author: Cuong NgoTerraLogic Inc

Page 2: Git & GitHub

Agenda

Overview

Repository

Basic command

GitHub features and demo on SourceTree

Git vs SVN

Q & A

Page 3: Git & GitHub

Overview

- Download link: https://git-scm.com/download/win

- Distributed revision control system.

- Created by Linus Torvalds in 2005.

Page 4: Git & GitHub

Repository

http://www.slideshare.net/JR0cket/git-and-github-verson-control-for-the-modern-developer/9

Page 5: Git & GitHub

http://www.slideshare.net/JR0cket/git-and-github-verson-control-for-the-modern-developer/10

Page 6: Git & GitHub

Basic command

- Config

- Basic command

Page 7: Git & GitHub

Basic command

- Cloning an Existing Repository

- Switch to the branch

Page 8: Git & GitHub
Page 9: Git & GitHub

GitHub summary

- https://github.com

- GitHub is a web-based on Git

- Largest host of source code in the world (April 2016: having more than 14 million users and more than 35 million repositories)

- Usually used to host open-source software projects

Page 10: Git & GitHub

Features

Total features of Git

Integrated issue tracking

Collaborative code review

- Pull request

- ...

...

Page 11: Git & GitHub

Workflow- Create a topic branch from master

- Make some commits to improve the project

- Push this branch to your GitHub project

- Open a Pull Request on GitHub

- Discuss, and optionally continue committing

- The project owner merges or closes the Pull Request

Page 12: Git & GitHub

Branch

- Make a branch

- Merge branches

Page 13: Git & GitHub

Fork

- Simply the same project in your own namespace.

- Don’t have to worry about adding users as collaborators.

- Contribute their changes back to the original repository by creating Pull Request.

Page 14: Git & GitHub

Pull Request

- To notify the changes to owner of a project

- Owner project approve or close PR

Page 15: Git & GitHub

Git vs SVN

- Git is much faster than Subversion

- Subversion allows you to check out just a subtree of a repository, Git requires you clone the entire repository.

- Git’s repositories are much smaller than Subversions

- E.G: For the Mozilla project, 30x smaller

- Subversion's UI is more mature than Git's

- Walking through versions is simpler in SVN because it uses sequential revision numbers (1,2,3,..); Git uses unpredictable SHA-1 hashes.

https://git.wiki.kernel.org/index.php/GitSvnComparison

Page 16: Git & GitHub

References

- https://git-scm.com/doc, Git Pro book.

- https://2buntu.com/articles/1459/keeping-your-forked-repo-synced-with-the-upstream-source/

- https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools

- https://git.wiki.kernel.org/index.php/GitSvnComparison

Page 17: Git & GitHub
Page 18: Git & GitHub