Successfully reported this slideshow.

The git

7,290 views

Published on

Published in: Technology

The git

  1. 1. Git n.KIM YongUk (@dalinaum) dalinaum@cpan.org
  2. 2. Linus, the Author of Linux• Linus Torvalds (ˈliːn.ɵs ˈtuːɹ.vald̥s)• Git n.
  3. 3. SVN Sucks! “Dont bother telling me about subversion”• Linus Torvalds (ˈliːn.ɵs ˈtuːɹ.vald̥s)• Git n.
  4. 4. Linus, the Author of Git• Linus Torvalds (ˈliːn.ɵs ˈtuːɹ.vald̥s)• Git n.
  5. 5. Why?• Cheap Local Branching• Everything is Local• Git is Fast• Git is Small• The Staging Area• Distributed• Any Workflow
  6. 6. Cheap Local Branching!• http://whygitisbetterthanx.com
  7. 7. Everything is Local!• http://whygitisbetterthanx.com
  8. 8. Fast!• http://whygitisbetterthanx.com
  9. 9. Staging Area!• http://whygitisbetterthanx.com
  10. 10. Small!• http://whygitisbetterthanx.com
  11. 11. Any Workflow• http://whygitisbetterthanx.com
  12. 12. ,?
  13. 13. MsysGit• Windows Git• Msys ( )• ... apt-get install git
  14. 14. • ... 3 , 7
  15. 15. • Contrats.
  16. 16. • /git• cd .
  17. 17. mkdir git-test• git-test .cd git-test• git-test .git init• .
  18. 18. • .git .
  19. 19. • ? ?
  20. 20. Subversion . I have a repository. SVN Server
  21. 21. GIT . I have a I have a repository Me too. repository. too.GIT Server tom PCruise PChristina arguilera • Subversion, CVS • GIT . • ,
  22. 22. i am a REMOTE!! push pull 100 . ! ?•• push pull
  23. 23. Mr. Local
  24. 24. , ? . Mr. Local$ git config --global user.name "Mr. Local"$ git config --global user.email "local@tom.cruise.com"
  25. 25. notepad.exe . .explorer .• (.) .• .
  26. 26. • . (hello.txt)
  27. 27. git status• .• hello.txt Untracked .
  28. 28. git add hello.txt• hello.txt .• hello.txt Changed to be commited .
  29. 29. git commit -m “init repo”• commit . :)• init repo .
  30. 30. !• hello.txt .
  31. 31. git add hello.txtgit commit -m “blah.. blah”• commit . :)
  32. 32. git log• .
  33. 33. • SVN .• GIT 40 (SHA) .
  34. 34. e7ee4•e7ee4 204cb•• .• ?
  35. 35. e7ee4 204cb f7ae3 39a3b e53a1• ? 1 3 5 2 4
  36. 36. 1 3 5 2 4• ? 1 3 5• .
  37. 37. ? .Miss Branches
  38. 38. #1• 1 .( 4 )cd ~mkdir aegugagit init
  39. 39. .
  40. 40. ssh-keygen -t RSA -C “ob@white.gov”• ob@white.gov RSA• ( : )• ,
  41. 41. id_rsa : id:rsa.pub:ls ~/.ssh• ~/.ssh .
  42. 42. . notepad.exe ? id_rsa.pub .cd ~/.sshexplorer .• (id_rsa.pub) .
  43. 43. • http://github.com .• rsa .
  44. 44. • Account Settings > Account Settings > SSH Public Keys• (id_rsa.pub) .
  45. 45. • Dashboard .• New Repository .
  46. 46. • Projet Name .• test .
  47. 47. SSH .• .
  48. 48. • .
  49. 49. ...••
  50. 50. remote ? . ? push .
  51. 51. remote Mr.Serverpull remote ? . pull push ? pull Mr. ServerremoteMr.Server
  52. 52. remote ? ? .
  53. 53. . .?origin
  54. 54. push origingit remote add origingit@github.com:dalinaum/test.git• .
  55. 55. git push origin master• origin master . master ? . SVN trunk .
  56. 56. #2• hello.txt github .
  57. 57. ? HEAD~2 HEAD~1 HEAD 204cb e7ee4 f7ae3HEAD .• HEAD ~1 .
  58. 58. git checkout HEAD~1• .git log• .git checkout master• master .git checkout HEAD~2• .git checkout master• master .
  59. 59. .git branch test• test . ?git branch• .
  60. 60. master ? checkout . . git checkout test ?
  61. 61. . ... ~! .git checkout -b test2• test2 .
  62. 62. .git checkout HEAD~1• .git checkout -b before• before . before .
  63. 63. . .git push origin before• origin before .
  64. 64. .
  65. 65. • HTTP Git Read-Only .• Git Read-Only .( )
  66. 66. git clone git://github.com/mirrors/linux-2.6.git• SVN checkout .• git pull .
  67. 67. #3• github .• : android cyanogen dalvik
  68. 68. • gingerbread ?
  69. 69. origin donut, eclair, froyo .git branch -a• branch .
  70. 70. git checkout -t origin/froyo• origin froyo .
  71. 71. git checkout -t origin/froyo• origin froyo .
  72. 72. git pull origin• origin . (svn update)
  73. 73. git tag• tag .
  74. 74. git checkout cm-7.0.1• cm-7.0.1 .git checkout froyo• froyo . ? ! thank you!
  75. 75. .git checkout HEAD~3git tag longlongagogit checkout froyo
  76. 76. #4• github . origin ? remote . git remote add . git push , remote . , git push sailormoon froyo .
  77. 77. Q&#0A
  78. 78. • .
  79. 79. Nil.
  80. 80. • .

×