git scm
DESCRIPTION
GIT Source code Management SystemTRANSCRIPT
![Page 1: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/1.jpg)
| Source codeManagement System
By @khasathan
SWT Tech Share
![Page 2: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/2.jpg)
In software development …
When you want to versioning.How do you do?
![Page 3: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/3.jpg)
SRC/MY_CODE
![Page 4: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/4.jpg)
SRC/- MY_CODE_ORG- MY_CODE_OLD- MY_CODE_NEW- MY_CODE_V1- MY_CODE_V2- MY_CODE_V...
![Page 5: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/5.jpg)
And When you work with your team ...
Have you ever had these problems?
![Page 6: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/6.jpg)
“Ahhh...Yesterday it work. Now, I get some error. Why?”
“I wrote my code here then It's missing.”
![Page 7: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/7.jpg)
“What's changed?”
“This version bugs. We must revert to previous version.”“OMG! I don't back up.”
![Page 8: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/8.jpg)
How we track our code?
![Page 9: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/9.jpg)
Source code Management System
● Collaborate tool● Code versioning● Backup your code
![Page 10: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/10.jpg)
Centralized VS Distributed (1)
Repository
Developers
![Page 11: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/11.jpg)
Centralized VS Distributed (2)
Remoterepository
Localrepository
Localrepository
Localrepository
Localrepository
Master Developers
![Page 12: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/12.jpg)
SCM bacsic concept
● Commit● Branch● Tag
![Page 13: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/13.jpg)
GIT Timeline
Commit Tag
Branch
![Page 14: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/14.jpg)
Why GIT?
● Distributed SCM● Freedom to play● Freedom to branch● Open source● Free code hosting and Collaborate tools
![Page 15: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/15.jpg)
Clone Methods
● HTTP/HTTPS● SSH
![Page 16: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/16.jpg)
Clone via Public Key
![Page 17: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/17.jpg)
Let's Try!
![Page 18: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/18.jpg)
Startup for Exist project (1)
$mkdir my_project/
$cd my_project/
$git init
$git remote add origin http://mydomain.com/user/try_git.git
![Page 19: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/19.jpg)
Startup for Exist project (2)
$touch README
$git add .
$git commit -m “my first commit”
$git push origin master
![Page 20: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/20.jpg)
Clone project from repo
$git clone [email protected]:user/try_git.git
$cd try_git/
...
Ready to work!
![Page 21: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/21.jpg)
Branching
$git branch
* master
$git branch feature1
$git checkout feature1
Switch to branch 'feature1'
![Page 22: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/22.jpg)
GIT Timeline
Feature1 branch
![Page 23: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/23.jpg)
Merging
$git checkout master
Switch to branch 'master'
$git merge feaure1
![Page 24: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/24.jpg)
GIT Timeline
Feature1 merge
![Page 25: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/25.jpg)
Tagging
$git tag v1.0
or
$git tag -a RC1 -m “first release candidate”
![Page 26: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/26.jpg)
GIT Timeline
Tag RC1
![Page 27: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/27.jpg)
Ignoring File
● .gitignore● Accept files your don't automatically add them to repository
![Page 28: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/28.jpg)
Pull Request / Merge Request
● Tell others about changes you've pushed to repository● The way for contributor submit new code to repository
![Page 29: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/29.jpg)
Pull Request Workflows
Remoterepository
Master
Submit request
Feed back to developer
Fork/Clone
Contributor
![Page 30: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/30.jpg)
Can we use GIT as CLI only?
![Page 31: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/31.jpg)
NO! Many GUI programs available
for GIT
![Page 32: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/32.jpg)
GIT UI Clients (1)
![Page 33: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/33.jpg)
GIT UI Clients (2)
![Page 34: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/34.jpg)
Collaborate Tools
● Free code hosting, social coding ● GitHub – public as default, pay for private● BitBucket – private, public project
● Self hosted GIT application e.g. GitLab
![Page 35: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/35.jpg)
GitLab
● GIT (Gitolite)● Wiki● Issues● Code review, comment● Administrator (user, group, project)
![Page 36: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/36.jpg)
GitLab - Overview
![Page 37: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/37.jpg)
GitLab – Navigations (1)
![Page 38: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/38.jpg)
GitLab – Navigations (2)
![Page 39: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/39.jpg)
GitLab – Create Project (1)
![Page 40: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/40.jpg)
GitLab – Create Project (2)
![Page 41: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/41.jpg)
GitLab – Create Project (3)
![Page 42: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/42.jpg)
GitLab – Public Key
![Page 43: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/43.jpg)
GitLab – Dashboard
![Page 44: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/44.jpg)
GitLab – Issue
![Page 45: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/45.jpg)
GitLab – Wiki
![Page 46: Git scm](https://reader034.vdocument.in/reader034/viewer/2022051818/54b76a554a79595d768b46ab/html5/thumbnails/46.jpg)
Q & A