いつやるの?Git入門

284,371
-1

Published on

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

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

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

Published in: Technology
9 Comments
587 Likes
Statistics
Notes
No Downloads
Views
Total Views
284,371
On Slideshare
0
From Embeds
0
Number of Embeds
118
Actions
Shares
0
Downloads
1,176
Comments
9
Likes
587
Embeds 0
No embeds

No notes for slide

いつやるの?Git入門

  1. 1. file2file1 dir1file3
  2. 2. git init
  3. 3. file2file1 dir1file3git init
  4. 4. git initfile2file1 dir1file3
  5. 5. git add <filepattern>...
  6. 6. file2file1 dir1file3git add file1 dir1/file2
  7. 7. file2file1file2file1 dir1file3git add file1 dir1/file2dir1
  8. 8. git commit -m <msg>
  9. 9. file2file1file2file1 dir1file3git commit -m ‘コミットするよ。’dir1
  10. 10. git commit -m ‘コミットするよ。’file21a401efile1file2file1file2file1 dir1file3dir1 dir1
  11. 11. file21a401efile1file2file1file2file1’ dir1file3dir1 dir1
  12. 12. file21a401efile1file2file1file2file1’ dir1file3git add .dir1 dir1
  13. 13. file21a401efile1file2file1’file2file1’ dir1file3git add .file3dir1 dir1
  14. 14. file21a401efile1file2file1’file2file1’ dir1file3 file3git commit -m ‘もっとコミット。’dir1 dir1
  15. 15. file21a401efile1510db8file3file1’file2file1’file3file2file1’ dir1file3git commit -m ‘もっとコミット。’dir1 dir1
  16. 16. file21a401efile1510db8file3file1’file2file1’file3file2file1’ dir1file3git commit -m ‘もっとコミット。’dir1 dir1
  17. 17. git rm <file>...
  18. 18. file21a401efile1510db8file3file1’file2file1’file3file2file1’ dir1file3git rm dir1/file2dir1 dir1
  19. 19. file21a401efile1510db8file3file1’file1’file3file1’ dir1file3git rm dir1/file2dir1 dir1
  20. 20. file21a401efile1510db8file3file1’file1’file3file1’ dir1file3git commit -m ‘削除情報をコミット。’dir1 dir1
  21. 21. file21a401efile1510db8 6ccfdafile3file1’file1’file3file1’ dir1file3git commit -m ‘削除情報をコミット。’dir1 dir1
  22. 22. git reset HEAD <file>
  23. 23. file21a401efile1510db8 6ccfdafile3file1’file1’file3’file1’ dir1file3’dir1 dir1
  24. 24. file21a401efile1510db8 6ccfdafile3file1’file1’file3’file1’ dir1file3’git reset HEAD dir1/file3dir1 dir1
  25. 25. file21a401efile1510db8 6ccfdafile3file1’file1’file3file1’ dir1file3’git reset HEAD dir1/file3dir1 dir1
  26. 26. git checkout -- <file>
  27. 27. file21a401efile1510db8 6ccfdafile3file1’file1’file3file1’ dir1file3’dir1 dir1
  28. 28. file21a401efile1510db8 6ccfdafile3file1’file1’file3file1’ dir1file3’git checkout -- dir1/file3dir1 dir1
  29. 29. file21a401efile1510db8 6ccfdafile3file1’file1’file3file1’ dir1file3git checkout -- dir1/file3dir1 dir1
  30. 30. git mv
  31. 31. git reset --<mode> <commit>
  32. 32. file21a401efile1510db8 6ccfdafile3file1’file1’file3file1’ dir1file3git reset --hard HEAD^dir1 dir1
  33. 33. file21a401efile1510db8 6ccfdafile3file1’file1’file3file1’ dir1file3git reset --hard HEAD^file2file2dir1 dir1
  34. 34. git status
  35. 35. git log
  36. 36. file21a401efile1510db8 6ccfdafile3file1’file1’file3file1’ dir1file3dir1 dir1
  37. 37. file21a401efile1510db8 6ccfdafile3file1’file1’file3file1’ dir1file3dir1 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 DE
  44. 44. A B C DE
  45. 45. A B C DE
  46. 46. A B C DEF
  47. 47. A B C DEF GH
  48. 48. A B C DE
  49. 49. A B C DE
  50. 50. A B C DE’E
  51. 51. A B C DE’
  52. 52. A B C DE’FG
  53. 53. Afile1Bfile1’file1’file1’
  54. 54. Afile1Bfile1’file1’file1’
  55. 55. git branch [<old>] <new>
  56. 56. git branch developAfile1Bfile1’file1’file1’
  57. 57. git branch developAfile1Bfile1’file1’file1’
  58. 58. git checkout <branch>
  59. 59. git checkout developAfile1Bfile2file1’Cfile1’file1’
  60. 60. git checkout developAfile1Bfile2file1’Cfile2file2file1 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 developfile1’file1’Afile1Bfile2file1’C
  65. 65. git merge developfile2file1’file2file1’Afile1Bfile2file1’DC
  66. 66. git rebase <branch>
  67. 67. Agit rebase masterfile1file2file2file1file1BCfile2file1’
  68. 68. Agit rebase masterBC’file2file1file1’file2file2file1’file1’
  69. 69. A B
  70. 70. A BA B
  71. 71. A BA B
  72. 72. A BA B
  73. 73. A B CA B
  74. 74. A B CA B C
  75. 75. A B CA B C
  76. 76. A B CA B
  77. 77. A B CA B C
  78. 78. A B CA B C D
  79. 79. A B C DA B C D
  80. 80. A B C D FA B C D E
  81. 81. A B C D FA B C D E GF
  82. 82. A B C D F GA B C D E GFE
  83. 83. A B C D FA B C D E
  84. 84. A B C D FA B C D FE E’
  85. 85. A B C D F E’A B C D F E’
  86. 86. A B C E FD G HA B C E F ID G
  87. 87. git clone <url>
  88. 88. A Bgit clone git@github.com:a/b.git
  89. 89. file1’file1’A Bfile1file1’A Bgit clone git@github.com:a/b.git
  90. 90. git push <remote> <refspec>
  91. 91. file1’file1’A Bfile1file1’A B
  92. 92. file1’file1’A Bfile2file1file1’A B
  93. 93. file1’file1’A Bfile2 file2file1file1’A Bgit add file2
  94. 94. file1’file1’A Bfile2 file2file1file1’A B Cfile2git commit -m ‘add file2’
  95. 95. file1’file1’A B Cfile1file1’A B Cfile2file2 file2git push origin master
  96. 96. git fetch <remote> <refspec>
  97. 97. file1’file1’A B Cgit fetch origin masterfile1file1’A B
  98. 98. file1’file1’A B Cgit fetch origin masterfile1file1’A B Cfile2
  99. 99. git pull <remote> <refspec>git merge <branch>git fetch <remote> <refspec>
  100. 100. file2file2A B Cgit pull origin masterfile1file1’A BDfile2
  101. 101. file1file1’A B CDEA B Cgit pull origin masterfile2file3file3file3file2file2
  102. 102. git pull <remote> <refspec> --rebasegit rebase <branch>git fetch <remote> <refspec>
  103. 103. file2file2A B Cgit pull origin master --rebasefile1file1’A BDfile2
  104. 104. file2file2A B Cgit pull origin master --rebasefile1file1’A BD’file2Cfile3file3file3
  105. 105. テキスト

×