Successfully reported this slideshow.

いつやるの?Git入門

659

Share

Loading in …3
×
1 of 204
1 of 204

いつやるの?Git入門

659

Share

Download to read offline

Description

↓のv1.1.0版の方が、より見やすく改善したものになってます!
http://www.slideshare.net/matsukaz/git-28304397

社内で開催したGit勉強会の資料。
SVNとの比較や、Gitの内部構造と各コマンドの関係、ブランチやリモートリポジトリとの関係を分かりやすく説明したつもり。

こういう資料に対する投げ銭的なのがどうなるのか気になっていたので、もしよろしければ・・・!15円からできるソーシャルカンパサービスだそうですm(_ _)m
http://kampa.me/t/dev

Transcript

  1. 1. file2 file1 dir1 file3
  2. 2. git init
  3. 3. file2 file1 dir1 file3 git init
  4. 4. git init file2 file1 dir1 file3
  5. 5. git add <filepattern>...
  6. 6. file2 file1 dir1 file3 git add file1 dir1/file2
  7. 7. file2 file1 file2 file1 dir1 file3 git add file1 dir1/file2 dir1
  8. 8. git commit -m <msg>
  9. 9. file2 file1 file2 file1 dir1 file3 git commit -m ‘コミットするよ。’ dir1
  10. 10. git commit -m ‘コミットするよ。’ file2 1a401e file1 file2 file1 file2 file1 dir1 file3 dir1 dir1
  11. 11. file2 1a401e file1 file2 file1 file2 file1’ dir1 file3 dir1 dir1
  12. 12. file2 1a401e file1 file2 file1 file2 file1’ dir1 file3 git add . dir1 dir1
  13. 13. file2 1a401e file1 file2 file1’ file2 file1’ dir1 file3 git add . file3 dir1 dir1
  14. 14. file2 1a401e file1 file2 file1’ file2 file1’ dir1 file3 file3 git commit -m ‘もっとコミット。’ dir1 dir1
  15. 15. file2 1a401e file1 510db8 file3 file1’ file2 file1’ file3file2 file1’ dir1 file3 git commit -m ‘もっとコミット。’ dir1 dir1
  16. 16. file2 1a401e file1 510db8 file3 file1’ file2 file1’ file3file2 file1’ dir1 file3 git commit -m ‘もっとコミット。’ dir1 dir1
  17. 17. git rm <file>...
  18. 18. file2 1a401e file1 510db8 file3 file1’ file2 file1’ file3file2 file1’ dir1 file3 git rm dir1/file2 dir1 dir1
  19. 19. file2 1a401e file1 510db8 file3 file1’file1’ file3 file1’ dir1 file3 git rm dir1/file2 dir1 dir1
  20. 20. file2 1a401e file1 510db8 file3 file1’file1’ file3 file1’ dir1 file3 git commit -m ‘削除情報をコミット。’ dir1 dir1
  21. 21. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3 git commit -m ‘削除情報をコミット。’ dir1 dir1
  22. 22. git reset HEAD <file>
  23. 23. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3’ file1’ dir1 file3’ dir1 dir1
  24. 24. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3’ file1’ dir1 file3’ git reset HEAD dir1/file3 dir1 dir1
  25. 25. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3’ git reset HEAD dir1/file3 dir1 dir1
  26. 26. git checkout -- <file>
  27. 27. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3’ dir1 dir1
  28. 28. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3’ git checkout -- dir1/file3 dir1 dir1
  29. 29. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3 git checkout -- dir1/file3 dir1 dir1
  30. 30. git mv
  31. 31. git reset --<mode> <commit>
  32. 32. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3 git reset --hard HEAD^ dir1 dir1
  33. 33. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3 git reset --hard HEAD^ file2file2 dir1 dir1
  34. 34. git status
  35. 35. git log
  36. 36. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3 dir1 dir1
  37. 37. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3 dir1 dir1
  38. 38. A B
  39. 39. A B
  40. 40. A B C
  41. 41. A B C
  42. 42. A B C D
  43. 43. A B C D E
  44. 44. A B C D E
  45. 45. A B C D E
  46. 46. A B C D E F
  47. 47. A B C D E F G H
  48. 48. A B C D E
  49. 49. A B C D E
  50. 50. A B C D E’E
  51. 51. A B C D E’
  52. 52. A B C D E’ F G
  53. 53. A file1 B file1’file1’file1’
  54. 54. A file1 B file1’file1’file1’
  55. 55. git branch [<old>] <new>
  56. 56. git branch develop A file1 B file1’file1’file1’
  57. 57. git branch develop A file1 B file1’file1’file1’
  58. 58. git checkout <branch>
  59. 59. git checkout develop A file1 B file2 file1’ C file1’file1’
  60. 60. git checkout develop A file1 B file2 file1’ C file2file2 file1 file1
  61. 61. git checkout -b <new> <old>
  62. 62. git checkout -b <new> <old> git checkout <new> git branch [<old>] <new>
  63. 63. git merge <branch>
  64. 64. git merge develop file1’file1’ A file1 B file2 file1’ C
  65. 65. git merge develop file2 file1’ file2 file1’ A file1 B file2 file1’ D C
  66. 66. git rebase <branch>
  67. 67. A git rebase master file1 file2file2 file1file1 B C file2 file1’
  68. 68. A git rebase master B C’ file2 file1 file1’ file2file2 file1’file1’
  69. 69. A B
  70. 70. A B A B
  71. 71. A B A B
  72. 72. A B A B
  73. 73. A B C A B
  74. 74. A B C A B C
  75. 75. A B C A B C
  76. 76. A B C A B
  77. 77. A B C A B C
  78. 78. A B C A B C D
  79. 79. A B C D A B C D
  80. 80. A B C D F A B C D E
  81. 81. A B C D F A B C D E G F
  82. 82. A B C D F G A B C D E G F E
  83. 83. A B C D F A B C D E
  84. 84. A B C D F A B C D F E E’
  85. 85. A B C D F E’ A B C D F E’
  86. 86. A B C E F D G H A B C E F I D G
  87. 87. git clone <url>
  88. 88. A B git clone git@github.com:a/b.git
  89. 89. file1’file1’ A B file1 file1’ A B git clone git@github.com:a/b.git
  90. 90. git push <remote> <refspec>
  91. 91. file1’file1’ A B file1 file1’ A B
  92. 92. file1’file1’ A B file2 file1 file1’ A B
  93. 93. file1’file1’ A B file2 file2 file1 file1’ A B git add file2
  94. 94. file1’file1’ A B file2 file2 file1 file1’ A B C file2 git commit -m ‘add file2’
  95. 95. file1’file1’ A B C file1 file1’ A B C file2 file2 file2 git push origin master
  96. 96. git fetch <remote> <refspec>
  97. 97. file1’file1’ A B C git fetch origin master file1 file1’ A B
  98. 98. file1’file1’ A B C git fetch origin master file1 file1’ A B C file2
  99. 99. git pull <remote> <refspec> git merge <branch> git fetch <remote> <refspec>
  100. 100. file2file2 A B C git pull origin master file1 file1’ A B D file2
  101. 101. file1 file1’ A B C D E A B C git pull origin master file2 file3 file3file3 file2file2
  102. 102. git pull <remote> <refspec> --rebase git rebase <branch> git fetch <remote> <refspec>
  103. 103. file2file2 A B C git pull origin master --rebase file1 file1’ A B D file2
  104. 104. file2file2 A B C git pull origin master --rebase file1 file1’ A B D’ file2 C file3 file3file3
  105. 105. テキスト

Description

↓のv1.1.0版の方が、より見やすく改善したものになってます!
http://www.slideshare.net/matsukaz/git-28304397

社内で開催したGit勉強会の資料。
SVNとの比較や、Gitの内部構造と各コマンドの関係、ブランチやリモートリポジトリとの関係を分かりやすく説明したつもり。

こういう資料に対する投げ銭的なのがどうなるのか気になっていたので、もしよろしければ・・・!15円からできるソーシャルカンパサービスだそうですm(_ _)m
http://kampa.me/t/dev

Transcript

  1. 1. file2 file1 dir1 file3
  2. 2. git init
  3. 3. file2 file1 dir1 file3 git init
  4. 4. git init file2 file1 dir1 file3
  5. 5. git add <filepattern>...
  6. 6. file2 file1 dir1 file3 git add file1 dir1/file2
  7. 7. file2 file1 file2 file1 dir1 file3 git add file1 dir1/file2 dir1
  8. 8. git commit -m <msg>
  9. 9. file2 file1 file2 file1 dir1 file3 git commit -m ‘コミットするよ。’ dir1
  10. 10. git commit -m ‘コミットするよ。’ file2 1a401e file1 file2 file1 file2 file1 dir1 file3 dir1 dir1
  11. 11. file2 1a401e file1 file2 file1 file2 file1’ dir1 file3 dir1 dir1
  12. 12. file2 1a401e file1 file2 file1 file2 file1’ dir1 file3 git add . dir1 dir1
  13. 13. file2 1a401e file1 file2 file1’ file2 file1’ dir1 file3 git add . file3 dir1 dir1
  14. 14. file2 1a401e file1 file2 file1’ file2 file1’ dir1 file3 file3 git commit -m ‘もっとコミット。’ dir1 dir1
  15. 15. file2 1a401e file1 510db8 file3 file1’ file2 file1’ file3file2 file1’ dir1 file3 git commit -m ‘もっとコミット。’ dir1 dir1
  16. 16. file2 1a401e file1 510db8 file3 file1’ file2 file1’ file3file2 file1’ dir1 file3 git commit -m ‘もっとコミット。’ dir1 dir1
  17. 17. git rm <file>...
  18. 18. file2 1a401e file1 510db8 file3 file1’ file2 file1’ file3file2 file1’ dir1 file3 git rm dir1/file2 dir1 dir1
  19. 19. file2 1a401e file1 510db8 file3 file1’file1’ file3 file1’ dir1 file3 git rm dir1/file2 dir1 dir1
  20. 20. file2 1a401e file1 510db8 file3 file1’file1’ file3 file1’ dir1 file3 git commit -m ‘削除情報をコミット。’ dir1 dir1
  21. 21. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3 git commit -m ‘削除情報をコミット。’ dir1 dir1
  22. 22. git reset HEAD <file>
  23. 23. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3’ file1’ dir1 file3’ dir1 dir1
  24. 24. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3’ file1’ dir1 file3’ git reset HEAD dir1/file3 dir1 dir1
  25. 25. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3’ git reset HEAD dir1/file3 dir1 dir1
  26. 26. git checkout -- <file>
  27. 27. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3’ dir1 dir1
  28. 28. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3’ git checkout -- dir1/file3 dir1 dir1
  29. 29. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3 git checkout -- dir1/file3 dir1 dir1
  30. 30. git mv
  31. 31. git reset --<mode> <commit>
  32. 32. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3 git reset --hard HEAD^ dir1 dir1
  33. 33. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3 git reset --hard HEAD^ file2file2 dir1 dir1
  34. 34. git status
  35. 35. git log
  36. 36. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3 dir1 dir1
  37. 37. file2 1a401e file1 510db8 6ccfda file3 file1’file1’ file3 file1’ dir1 file3 dir1 dir1
  38. 38. A B
  39. 39. A B
  40. 40. A B C
  41. 41. A B C
  42. 42. A B C D
  43. 43. A B C D E
  44. 44. A B C D E
  45. 45. A B C D E
  46. 46. A B C D E F
  47. 47. A B C D E F G H
  48. 48. A B C D E
  49. 49. A B C D E
  50. 50. A B C D E’E
  51. 51. A B C D E’
  52. 52. A B C D E’ F G
  53. 53. A file1 B file1’file1’file1’
  54. 54. A file1 B file1’file1’file1’
  55. 55. git branch [<old>] <new>
  56. 56. git branch develop A file1 B file1’file1’file1’
  57. 57. git branch develop A file1 B file1’file1’file1’
  58. 58. git checkout <branch>
  59. 59. git checkout develop A file1 B file2 file1’ C file1’file1’
  60. 60. git checkout develop A file1 B file2 file1’ C file2file2 file1 file1
  61. 61. git checkout -b <new> <old>
  62. 62. git checkout -b <new> <old> git checkout <new> git branch [<old>] <new>
  63. 63. git merge <branch>
  64. 64. git merge develop file1’file1’ A file1 B file2 file1’ C
  65. 65. git merge develop file2 file1’ file2 file1’ A file1 B file2 file1’ D C
  66. 66. git rebase <branch>
  67. 67. A git rebase master file1 file2file2 file1file1 B C file2 file1’
  68. 68. A git rebase master B C’ file2 file1 file1’ file2file2 file1’file1’
  69. 69. A B
  70. 70. A B A B
  71. 71. A B A B
  72. 72. A B A B
  73. 73. A B C A B
  74. 74. A B C A B C
  75. 75. A B C A B C
  76. 76. A B C A B
  77. 77. A B C A B C
  78. 78. A B C A B C D
  79. 79. A B C D A B C D
  80. 80. A B C D F A B C D E
  81. 81. A B C D F A B C D E G F
  82. 82. A B C D F G A B C D E G F E
  83. 83. A B C D F A B C D E
  84. 84. A B C D F A B C D F E E’
  85. 85. A B C D F E’ A B C D F E’
  86. 86. A B C E F D G H A B C E F I D G
  87. 87. git clone <url>
  88. 88. A B git clone git@github.com:a/b.git
  89. 89. file1’file1’ A B file1 file1’ A B git clone git@github.com:a/b.git
  90. 90. git push <remote> <refspec>
  91. 91. file1’file1’ A B file1 file1’ A B
  92. 92. file1’file1’ A B file2 file1 file1’ A B
  93. 93. file1’file1’ A B file2 file2 file1 file1’ A B git add file2
  94. 94. file1’file1’ A B file2 file2 file1 file1’ A B C file2 git commit -m ‘add file2’
  95. 95. file1’file1’ A B C file1 file1’ A B C file2 file2 file2 git push origin master
  96. 96. git fetch <remote> <refspec>
  97. 97. file1’file1’ A B C git fetch origin master file1 file1’ A B
  98. 98. file1’file1’ A B C git fetch origin master file1 file1’ A B C file2
  99. 99. git pull <remote> <refspec> git merge <branch> git fetch <remote> <refspec>
  100. 100. file2file2 A B C git pull origin master file1 file1’ A B D file2
  101. 101. file1 file1’ A B C D E A B C git pull origin master file2 file3 file3file3 file2file2
  102. 102. git pull <remote> <refspec> --rebase git rebase <branch> git fetch <remote> <refspec>
  103. 103. file2file2 A B C git pull origin master --rebase file1 file1’ A B D file2
  104. 104. file2file2 A B C git pull origin master --rebase file1 file1’ A B D’ file2 C file3 file3file3
  105. 105. テキスト

More Related Content

More from Masakazu Matsushita

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

×