• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
モデルから知るGit
 

モデルから知るGit

on

  • 10,587 views

Git初心者向けの解説です。図が中心。

Git初心者向けの解説です。図が中心。

Statistics

Views

Total Views
10,587
Views on SlideShare
9,708
Embed Views
879

Actions

Likes
23
Downloads
55
Comments
0

16 Embeds 879

http://planet.ezocast.net 294
http://d.hatena.ne.jp 288
http://feedly.com 158
http://bikkuri.me 66
http://creive.me 25
http://wiki.onakasuita.org 16
http://webcache.googleusercontent.com 9
http://digg.com 8
http://paper.li 3
http://favtile.com 2
https://twitter.com 2
http://tenkao.tumblr.com 2
http://safe.tumblr.com 2
http://twitter.com 2
http://a0.twimg.com 1
https://reader.aol.co.jp 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    モデルから知るGit モデルから知るGit Presentation Transcript

    • Git2011 3 9 (id:hiratara)
    • • (id:hiratara)•• Perl Python Java Haskell• Git
    • • Git•••
    • hoge.git/hoge/.git/ bare config config refs refs ... ... dir hoge/ dir .gitignore hoge.txt dir ...
    • Git
    • Git•• Linus•
    • Git
    • .git/• .git/config git config• .git/refs/...
    • Author: hirataraDate: 2/25 13:43:42typoindex.htmlimages/flower.gifcss/index.cssjs/index.js
    • • ( )• 2• ( root)•
    • •• = index.html = flower.gif index.js
    • git svnSVNGit A B C D
    • git svn git merge --squashSVNGit
    • git svn• git • git ID → • →
    • git•• →• ID
    • remotes/origin/mastertags/0.9973 heads/topic heads/master
    • =refs/heads• ref .git/refs • .git/refs/tags/ • .git/refs/heads/ • .git/refs/remotes/
    • ref• .git/• .git/refs/• .git/refs/tags/• .git/refs/heads/• .git/refs/remotes/
    • ref• 2 heads/hiratara/master remotes/hiratara/master• hiratara/master• remotes/hiratara/master
    • topic master
    • git commit(1)topic 1 master
    • git commit(2) topic1 2 master
    • topic1 2 master
    • git merge topic1 2 master
    • git commit(3) topic1 2 master 3
    • topic topic1 2 master 3
    • git commit(4) topic1 2 4 master 3
    • ID• ID →ID• ID → ID →ID
    • ID SHA1 • • ID
    • • ID →ID →• Git
    • topicB C master A
    • git rebaseB C B C master topic A B’ C’
    • topicB C master A
    • git cherry-pick B topic B C master A B
    • git cherry-pick C topic B C master A B C
    • masterA B C
    • rebase -i HEAD~3 master A B C A B C A B C
    • reflog • • git reflog show master C master
    • masterA B CA B C
    • git reset CA B C masterA B C
    • masterA B C
    • git revert A masterA B C -A
    • topic master
    • committopic master
    • git merge master topic master
    • 3.git topic master A B C D D D
    • • •• staged cached
    • .git topic master A B C D D D’
    • git add.git topic master A B C D add D’ D’
    • .git topic master A B C D D’ D’’
    • git add.git topic master A B C D add D’’ D’’
    • git commit.git topic master A B C D D’’ commit D’’ D’’
    • • D’ →•
    • 3.git topic master A B C D commit -a commit commit filename add D’ D’’
    • (1).git topic master A B C D D D
    • git checkout master.git topic master A B C D C C
    • (2).git topic master A B C D D D
    • git checkout master ..git topic master A B C D C C
    • git checkout ..git topic master A B C D D D
    • (1).git topic master A B C D C C
    • git reset --soft topic.git topic master A B C D C C
    • git reset topic.git topic master A B C D D C
    • git reset --hard topic.git topic master A B C D D D
    • • (origin/master )• git fetch git push
    • git@github.com:him/hoge.git A B C D master~/git-repos/hoge A B C X master
    • git remote addgithub => git@github.com:him/hoge.git A B C D master git remote add github git@...~/git-repos/hoge A B C X master
    • git fetchgithub => git@github.com:him/hoge.git A B C D master git fetch github~/git-repos/hoge ( git remote update) D github/master A B C X master
    • refspec•• push, fetch (fetch )githubheads/from git fetch github from:toheads/to ※ headsheads/to git push github from:toheads/from
    • fetch refspec• git remote add•
    • merge rebasegithub => git@github.com:him/hoge.git A B C D master~/git-repos/hoge git rebase github/master D github/master A B C X X` master
    • git pushgithub => git@github.com:him/hoge.git A B C D X` master~/git-repos/hoge git push github D github/master A B C X X` master
    • push refspec• refspec →" push"• push.default nothing, matching, tracking, current• remote.<name>.push (F/W fetch )
    • fetch pull push(1)github => git@github.com:him/hoge.githeads/masterheads/another git fetch github~/git-repos/hoge remote.<name>.fetchremotes/github/masterremotes/github/anotherheads/masterheads/local-branchheads/another
    • fetch pull push(2)github => git@github.com:him/hoge.githeads/masterheads/another branch.<name>.remote~/git-repos/hoge git pull = fetch + mergeremotes/github/masterremotes/github/another branch.<name>.mergeheads/masterheads/local-branchheads/another
    • fetch pull push(3)github => git@github.com:him/hoge.githeads/masterheads/another git push github~/git-repos/hoge push.default=matchingremotes/github/masterremotes/github/anotherheads/masterheads/local-branchheads/another
    • githuborigin/topic1 masterorigin/master topic1 master
    • hanako taro cloneorigin/topic1 masterorigin/master topic1 masterorigin/topic1origin/master
    • hanako topic2origin/topic1 masterorigin/master topic1 masterorigin/topic1 topic2origin/master
    • hanako taro forkorigin/topic1 masterorigin/master topic1 masterorigin/topic1 topic2origin/master topic1 master
    • git remote -f addorigin/topic1 master origin/master topic1 masterhanako/topic1 origin/topic1 topic2hanako/master origin/master topic1 master
    • git push hanako topic2origin/topic1 master origin/master topic1 masterhanako/topic1 origin/topic1 topic2 hanako/topic2 topic2hanako/master origin/master topic1 master
    • tarou pull-reqorigin/topic1 master origin/master topic1 master pull requesthanako/topic1 origin/topic1 topic2 hanako/topic2 topic2hanako/master origin/master topic1 master
    • taro remote addhanako/topic1 master hanako/topic2 origin/topic1hanako/master origin/master topic1 masterhanako/topic1 origin/topic1 topic2 hanako/topic2 topic2hanako/master origin/master topic1 master
    • merge hanako/topic2hanako/topic1 master hanako/topic2 origin/topic1hanako/master origin/master topic1 masterhanako/topic1 origin/topic1 topic2 hanako/topic2 topic2hanako/master origin/master topic1 master
    • git push origin masterhanako/topic1 master hanako/topic2 origin/topic1hanako/master origin/master master origin/master topic1hanako/topic1 origin/topic1 topic2 hanako/topic2 topic2hanako/master origin/master topic1 master
    • github
    • • git svn →• git