Git勉強会@KRAY

C3191b3ed166724aa0ea3ed9d2784772?s=47 danny
July 06, 2013

 Git勉強会@KRAY

C3191b3ed166724aa0ea3ed9d2784772?s=128

danny

July 06, 2013
Tweet

Transcript

  1. Gitษڧձ@KRAY danny גࣜձࣾΫϨΠ 2013 7/5

  2. ࣗݾ঺հ • Blog (http://f96q.github.io/) • ීஈ͸RailsͰWebΞϓϦͷ։ൃΛ΍ͬͯ ·͢ • ࠷ۙ͸iPhoneΞϓϦͷ։ൃΛ΍ͬͯ·͢

  3. ࣗݾ঺հ Rubyist Magazine 0041߸

  4. ࣗݾ঺հ

  5. ࠓ೔࿩͢͜ͱ • Gitͷ࣮ફతͳ࢖͍ํ • GitLabʹ͍ͭͯ • Gitͷιʔείʔυղੳ

  6. Gitͷ࣮ફతͳ࢖͍ํ

  7. ҰͭͷϦϙδτϦͰσβΠϯ༻ͷ੩త htmlͱΞϓϦͷιʔείʔυΛ؅ཧ͠ ͨΜ͚ͩͲ

  8. orphan branch • ࠜݩ͕ͭͳ͕ͬͯͳ͍ϒϥϯνΛ࡞Ε Δ • git checkout --orphan branch-name

  9. Ͱ΋͍͍ͪͪσβΠϯ༻ͷϒϥϯνͱ ։ൃ༻ͷϒϥϯνΛ੾Γସ͑ͨ͘ͳ͍ Μ͚ͩͲ

  10. git-new-workdir • ϫʔΩϯάίϐʔΛෳ਺࣋ͯΔ

  11. rebaseͨ͠Βmergeίϛοτ͕ফ͑ͯ ͠·͏Μ͚ͩͲ

  12. mergeίϛοτΛอ࣋ͨ͠··rebase • git rebase -p branch-name

  13. ϦϞʔτϦϙδτϦʹpush͢Δͱ411 ͕ฦ͖ͬͯͯpushͰ͖ͳ͍Μ͚ͩͲ

  14. • git config http.postBufferͷαΠζΛେ͖ ͘͢Δ

  15. աڈͷίϛοτΛૉૣ͘ಡΈ͍ͨΜͩ ͚Ͳ

  16. ϦϙδτϦϒϥ΢β •brew install tig

  17. MacͰ࢖ͬͯΔͱ.DS_StoreΛίϛοτ ͦ͠͏ʹͳΔΜ͚ͩͲ

  18. ίϛοτͷର৅͔Β֎͢ [core] excludesfile = ~/.gitignore .gitconfig ~/.gitignore .DS_Store

  19. GitLabʹ͍ͭͯ

  20. Gitlabʹ͍ͭͯ • GithubΫϩʔϯ • RailsΞϓϦ • ࣾ಺ͩͱGitorious + GitHub͔ΒGitLabʹ •

    GitoriousͩͱɺͲͷϢʔβʔͰ΋શ෦ͷϦϙδτϦͷιʔε͕ΈΔ ͜ͱ͕Ͱ͖ͨ • GitHubͩͱϓϥΠϕʔτϦϙδτϦ૿͑Δ΄Ͳ͓͕͔͔ۚΔ
  21. GitLab͍͍ͱ͜Ζ • ಛఆͷϢʔβʔ͚ͩΈΕΔϦϙδτϦ ࡞ΕΔ • ϓϥΠϕʔτϦϙδτϦ࡞Γ์୊ • merge request •

    GitHubʹൺ΂ͨΒػೳతʹ͸ྼΔͱ͜ Ζ͸͋Δ͚Ͳͦͦ͜͜࢖͑Δ
  22. GitLabେมͳ͜ͱ • αʔόʔ༻ҙ • ໰୊͕ग़ͨΒࣗ෼ͨͪͰղܾ͠ͳ͍ͱ ͍͚ͳ͍ • ࢖ͬͯΔͱෆ۩߹ʹૺ۰ • sidekickམͪͯΔ

    • ϝʔϧ͕ඈ͹ͳ͍ • ϦϙδτϦ৽ن࡞੒ͯ͠࠷ॳͷpushͰ͖ͳ͍
  23. Gitͷιʔείʔυղੳ

  24. GitͷΦϒδΣΫτͷλΠϓ enum object_type { OBJ_BAD = -1, OBJ_NONE = 0,

    OBJ_COMMIT = 1, OBJ_TREE = 2, OBJ_BLOB = 3, OBJ_TAG = 4, /* 5 for future expansion */ OBJ_OFS_DELTA = 6, OBJ_REF_DELTA = 7, OBJ_ANY, OBJ_MAX };
  25. Object struct object { unsigned parsed : 1; unsigned used

    : 1; unsigned type : TYPE_BITS; unsigned flags : FLAG_BITS; unsigned char sha1[20]; };
  26. bolb struct blob { struct object object; };

  27. tree struct tree { struct object object; void *buffer; unsigned

    long size; };
  28. tag struct tag { struct object object; struct object *tagged;

    char *tag; unsigned long date; };
  29. commit struct commit { struct object object; void *util; unsigned

    int index; unsigned long date; struct commit_list *parents; struct tree *tree; char *buffer; }; struct commit_list { struct commit *item; struct commit_list *next; };
  30. ·ͱΊ • σʔλʔߏ଄ΈΔ͚ͩͰ΋෼͔Δ͜ͱ ͕͋Δ