git slide
DESCRIPTION
Source Code Management with Git and Github. Nov 18, 2012. Department of Computing, Silpakorn University.TRANSCRIPT
![Page 1: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/1.jpg)
November 18, 2012
Source Code Management with Git & Github.comKiattisak Anoochitarom
![Page 2: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/2.jpg)
Introduction to VCS
What is version control, and why should care ? Version Control is a system that record changes to a file or set of files over time so that you can recall a specific versions later. For the example in this class you will use software source code as the files being version controlled, through in reality you can do this with nearly any type of file on a computer.
It allows you to revert files back to a previous state, revert the entire project back to a previous state, compare changes over time, see who last modified something that might be causing a problem, who introduced an issue and when, and more.
![Page 3: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/3.jpg)
Local Version Control
![Page 4: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/4.jpg)
Centralized Version Control
![Page 5: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/5.jpg)
Centralized Version Control
![Page 6: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/6.jpg)
Distributed Version Control
Full Mirror
Almost Everything is Local
Fast
Full Backup
Work Offline
![Page 7: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/7.jpg)
Version Control System Software
SVN (Subversion)Mercurial (HG)
![Page 8: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/8.jpg)
Git
![Page 9: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/9.jpg)
FastSimpleMany branchesFully Distributed
Work efficiently with Linux Kernel
![Page 10: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/10.jpg)
Who use git ?
![Page 11: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/11.jpg)
![Page 12: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/12.jpg)
3 File Status on Git
untracked unmodified modified staged
edit the file
stage the file
commit the file
add the file
remove the file
![Page 13: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/13.jpg)
3 Stages of Git
The Basic Git workflow
1. You modify files in your working directory.2. You stage the files.3. You do a commit, files on your staging area are permanently stores in Repository.
working directory
staging area
git directory (repository)
checkout the project
stage files
commit files
![Page 15: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/15.jpg)
Basic Configuration
$ git config --global user.name “iMacbaszii” ***
$ git config --global user.email “[email protected]” ***
$ git config --global core.editor mate
$ git config --global merge.tool vimdiff
$ git config --list ***
$ git config user.name ***
![Page 16: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/16.jpg)
Create Repository
![Page 17: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/17.jpg)
Stage and Commit File
![Page 18: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/18.jpg)
Check your files status
![Page 19: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/19.jpg)
Log Committed History
![Page 20: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/20.jpg)
Remove, Rename File
![Page 21: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/21.jpg)
Demo
![Page 22: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/22.jpg)
Github.com
![Page 23: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/23.jpg)
Generating SSH Keys (public key)
https://help.github.com/articles/generating-ssh-keys
$ ssh-keygen -t rsa -C “[email protected]”
![Page 24: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/24.jpg)
Add your SSH key to Github
https://help.github.com/articles/generating-ssh-keys
![Page 25: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/25.jpg)
Create online Repository
![Page 26: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/26.jpg)
Quick setup
![Page 27: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/27.jpg)
Work with Github
![Page 28: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/28.jpg)
It’s work.
![Page 29: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/29.jpg)
Clone Repository
![Page 30: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/30.jpg)
Many Open-Source Library on Github
![Page 31: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/31.jpg)
GUI Tools
http://code.google.com/p/tortoisegit/http://www.sourcetreeapp.com
Tortoise GitSourceTree
![Page 32: Git slide](https://reader034.vdocuments.us/reader034/viewer/2022052622/558de4e11a28ab07438b466a/html5/thumbnails/32.jpg)
Book Recommended
https://github.com/opendream/progithttp://www.progit.org