Git scm

1,058 views

Published on

GIT Source code Management System

Published in: Technology
1 Comment
4 Likes
Statistics
Notes
No Downloads
Views
Total views
1,058
On SlideShare
0
From Embeds
0
Number of Embeds
297
Actions
Shares
0
Downloads
23
Comments
1
Likes
4
Embeds 0
No embeds

No notes for slide

Git scm

  1. 1. SWT Tech Share | Source codeManagement System By @khasathan
  2. 2. In software development … When you want to versioning. How do you do?
  3. 3. SRC/MY_CODE
  4. 4. SRC/ - MY_CODE_ORG - MY_CODE_OLD - MY_CODE_NEW - MY_CODE_V1 - MY_CODE_V2 - MY_CODE_V...
  5. 5. And When you work with yourteam ... Have you ever had these problems?
  6. 6. “Ahhh...Yesterday it work. Now,I get some error. Why?”“I wrote my code here then Itsmissing.”
  7. 7. “Whats changed?”“This version bugs. We must revertto previous version.”“OMG! I dont back up.”
  8. 8. How we track our code?
  9. 9. Source code Management System● Collaborate tool● Code versioning● Backup your code
  10. 10. Centralized VS Distributed (1) Repository Developers
  11. 11. Centralized VS Distributed (2) Local Remote repositoryrepository Local repository Local Local repositoryrepository Master Developers
  12. 12. SCM bacsic concept● Commit● Branch● Tag
  13. 13. GIT Timeline Branch Commit Tag
  14. 14. Why GIT?● Distributed SCM● Freedom to play● Freedom to branch● Open source● Free code hosting and Collaborate tools
  15. 15. Clone Methods● HTTP/HTTPS● SSH
  16. 16. Clone via Public Key
  17. 17. Lets Try!
  18. 18. Startup for Exist project (1)$mkdir my_project/$cd my_project/$git init$git remote add originhttp://mydomain.com/user/try_git.git
  19. 19. Startup for Exist project (2)$touch README$git add .$git commit -m “my first commit”$git push origin master
  20. 20. Clone project from repo$git clonegit@domain.com:user/try_git.git$cd try_git/...Ready to work!
  21. 21. Branching$git branch* master$git branch feature1$git checkout feature1Switch to branch feature1
  22. 22. GIT Timeline Feature1 branch
  23. 23. Merging$git checkout masterSwitch to branch master$git merge feaure1
  24. 24. GIT Timeline Feature1 merge
  25. 25. Tagging$git tag v1.0or$git tag -a RC1 -m “first releasecandidate”
  26. 26. GIT Timeline Tag RC1
  27. 27. Ignoring File● .gitignore● Accept files your dont automatically add themto repository
  28. 28. Pull Request / Merge Request● Tell others about changes youve pushed torepository● The way for contributor submit new code torepository
  29. 29. Pull Request Workflows Remote repository Fork/C lone s t re que ub mit S Contributor e r ve lop e k to d b ac Feed Master
  30. 30. Can we use GIT as CLI only?
  31. 31. NO!Many GUI programs available for GIT
  32. 32. GIT UI Clients (1)
  33. 33. GIT UI Clients (2)
  34. 34. 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
  35. 35. GitLab● GIT (Gitolite)● Wiki● Issues● Code review, comment● Administrator (user, group, project)
  36. 36. GitLab - Overview
  37. 37. GitLab – Navigations (1)
  38. 38. GitLab – Navigations (2)
  39. 39. GitLab – Create Project (1)
  40. 40. GitLab – Create Project (2)
  41. 41. GitLab – Create Project (3)
  42. 42. GitLab – Public Key
  43. 43. GitLab – Dashboard
  44. 44. GitLab – Issue
  45. 45. GitLab – Wiki
  46. 46. Q&A

×