• Like
Gitのおさらい
Upcoming SlideShare
Loading in...5
×

Gitのおさらい

  • 3,451 views
Uploaded on

Gitのオブジェクト/インデックスを理解して、直感的にGitを使いこなしましょう。 …

Gitのオブジェクト/インデックスを理解して、直感的にGitを使いこなしましょう。
解説記事 http://d.hatena.ne.jp/ja9/20110822/1313986395

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
3,451
On Slideshare
0
From Embeds
0
Number of Embeds
5

Actions

Shares
Downloads
18
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. TDDBC Tokyo 1.7 for PHP 2011-08-21 @madapaja
  • 2. < >< >
  • 3. < >< >
  • 4. < >< >
  • 5. < >< >
  • 6. 5ae168cf492bead24f9c24319e3ef2ba3d5b8f3ablob 956<?phpnamespace Xanadu;class Controller{    private $name; : :
  • 7. 5ae168cf492bead24f9c24319e3ef2ba3d5b8f3ablob 956<?phpnamespace Xanadu;class Controller{    private $name; : :
  • 8. 5ae168cf492bead24f9c24319e3ef2ba3d5b8f3ablob 956<?phpnamespace Xanadu;class Controller{    private $name; : :
  • 9. a7e52bd45207ff7d202125b5eab2bdf172c506e9tree 42100644 blob 5ae168cf492bead24f9c24319e3ef2ba3d5b8f3a    Controller.php
  • 10. a7e52bd45207ff7d202125b5eab2bdf172c506e9 tree 42mode 100644 blob 5ae168cf492bead24f9c24319e3ef2ba3d5b8f3a    Controller.php
  • 11. a7e52bd45207ff7d202125b5eab2bdf172c506e9 tree 42mode 100644 blob 5ae168cf492bead24f9c24319e3ef2ba3d5b8f3a    Controller.php
  • 12. a7e52bd45207ff7d202125b5eab2bdf172c506e9 tree 42mode 100644 blob 5ae168cf492bead24f9c24319e3ef2ba3d5b8f3a    Controller.php
  • 13. a7e52bd45207ff7d202125b5eab2bdf172c506e9 tree 42mode 100644 blob 5ae168cf492bead24f9c24319e3ef2ba3d5b8f3a    Controller.php
  • 14. 54be572c17595e83dd84bbb14cae7edb9dd65a18commit 172tree a7e52bd45207ff7d202125b5eab2bdf172c506e9author madapaja <iwasaki@cresc.com> 1313731598 +0900committer madapaja <iwasaki@cresc.com> 1313731598 +0900my first commit
  • 15. $ git tag stable-1
  • 16. checkout
  • 17. checkout
  • 18. checkout add
  • 19. checkout addcommit
  • 20. checkout add
  • 21. checkout add
  • 22. checkout addcommit
  • 23. checkout addcommit
  • 24. checkout add
  • 25. checkout add
  • 26. checkout add add
  • 27. checkout add addcommit
  • 28. $ cd path/to/project$ git init
  • 29. $ cd path/to/project$ git init$ git clone git://path/to/project$ cd project
  • 30. $ git add target.php$ git add -u         
  • 31. $ git add target.php$ git add -u         $ git rm --cached target.php $ git rm target.php
  • 32. $ git add target.php$ git add -u         $ git rm --cached target.php $ git rm target.php$ git status
  • 33. $ git add target.php$ git add -u         $ git rm --cached target.php $ git rm target.php$ git status$ git diff
  • 34. $ git add target.php$ git add -u         $ git rm --cached target.php $ git rm target.php$ git status$ git diff$ git checkout target.php
  • 35. $ git add target.php$ git add -u         $ git rm --cached target.php $ git rm target.php$ git status$ git diff$ git checkout target.php$ git reset HEAD target.php
  • 36. $ git diff --cached
  • 37. $ git diff --cached$ git commit
  • 38. $ git diff --cached$ git commit$ git commit --amend
  • 39. $ git diff --cached$ git commit$ git commit --amend$ git reset --soft HEAD^
  • 40. $ git diff HEAD
  • 41. $ git diff HEADgit add -u && git commit$ git commit -a
  • 42. $ git diff HEADgit add -u && git commit$ git commit -a$ git revert a5102ef4
  • 43. $ git diff HEADgit add -u && git commit$ git commit -a$ git revert a5102ef4$ git reset --hard HEAD^
  • 44. $ git checkout master
  • 45. $ git checkout mastergit branch branch1 && git checkout branch1$ git checkout -b branch1
  • 46. $ git checkout mastergit branch branch1 && git checkout branch1$ git checkout -b branch1$ git merge new_function$ git merge --no-commit new_function
  • 47. $ git log
  • 48. $ git log$ git diff HEAD^..HEAD
  • 49. $ git log$ git diff HEAD^..HEAD$ git branch
  • 50. $ git log$ git diff HEAD^..HEAD$ git branch$ git branch experimental
  • 51. $ git log$ git diff HEAD^..HEAD$ git branch$ git branch experimental$ git branch -d experimental$ git branch -D experimental
  • 52. $ git branch -r
  • 53. $ git branch -r$ git fetch origin
  • 54. $ git branch -r$ git fetch origin$ git merge origin/master
  • 55. $ git branch -r$ git fetch origin$ git merge origin/master git fetch origin && git merge origin/master$ git pull origin master
  • 56. $ git branch -r$ git fetch origin$ git merge origin/master git fetch origin && git merge origin/master$ git pull origin master$ git push origin :experimental
  • 57. $ git branch -r$ git fetch origin$ git merge origin/master git fetch origin && git merge origin/master$ git pull origin master$ git push origin :experimental$ git push origin master