Git トピックブランチと歴史の改ざん

download Git トピックブランチと歴史の改ざん

If you can't read please download the document

Transcript of Git トピックブランチと歴史の改ざん

  1. 1. Git Git 2015/7/25
  2. 2. : : codeArts : html5j
  3. 3. Git ! !
  4. 4. ?
  5. 5. ! !
  6. 6. !
  7. 7. ( ...)
  8. 8. (...)
  9. 9. (...)
  10. 10. (! !)
  11. 11. !
  12. 12. OK! !
  13. 13. (...)
  14. 14. (! !)
  15. 15. (...)
  16. 16. !
  17. 17. OK! !
  18. 18. (...)
  19. 19. !
  20. 20. (...)
  21. 21. !
  22. 22.
  23. 23. ?
  24. 24. master ! git clone [email protected]:masakura/git-training.git !
  25. 25. ! ! git checkout -b topic1 master topic1
  26. 26. ! !
  27. 27. ! git add . git commit master topic1
  28. 28. master git checkout master git checkout -b topic2 master topic1topic2
  29. 29. git add . git commit master topic1 topic2
  30. 30. master master git checkout master git merge topic2 master topic1 topic2
  31. 31. git branch -d topic2 master topic1
  32. 32. master !
  33. 33. git checkout topic1 master topic1
  34. 34. () git merge master master topic1
  35. 35. git add . git commit master topic1
  36. 36. master git checkout master git merge topic1 master topic1
  37. 37. git branch -d topic1 master
  38. 38. master ! !
  39. 39.
  40. 40.
  41. 41. ?
  42. 42. !
  43. 43. ! ... 150122-1 150122 150120 ...
  44. 44. amend amend git commit amend ! !
  45. 45. ! (additems) git checkout additems
  46. 46. ! index.html git add . git commit --amend
  47. 47. ! git diff HEAD^ HEAD
  48. 48. rebase -i rebase -i! git rebase -i HEAD^^^ pick edit git commit amend rebase continue git rebase --continue
  49. 49. ! git rebase -i HEAD^^^ pick edit pick 7750dc6 first commit pick e992563 pick 62fad5e # Rebase ecec74d..62fad5e onto ecec74d # # Commands: # p, pick = use commit # r, reword = use commit, but edit the commit message # e, edit = use commit, but stop for amending # s, squash = use commit, but meld into previous commit # f, fixup = like "squash", but discard this commit's log message # x, exec = run command (the rest of the line) using shell
  50. 50. ! git add . git commit --amend rebase --continue git rebase --continue rebasegit status
  51. 51. rebase -i push push push -f
  52. 52. ... Git... Etc...
  53. 53. ! Pull Request
  54. 54. Git http://www.backlog.jp/git-guide/ ! ProGit https://git-scm.com/book/ja/v1 Git
  55. 55. !