Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Git workshop

Git workshop

Nubee Tokyo Oct. 3, 2012

Daichi Hirata

October 03, 2012
Tweet

More Decks by Daichi Hirata

Other Decks in Programming

Transcript

  1. Repository Working Tree Index Component git checkout git add ϫʔΩϯάπϦʔͷมߋ͕Πϯ

    σοΫε΁ొ࿥͞ΕΔ $IBOHFUIFXPSLJOHUSFFUPUIFJOEFYJT SFHJTUFSFE
  2. Repository Working Tree Index Component git checkout git add ΠϯσοΫεͷมߋ͕ϦϙδτϦ

    ΁ίϛοτ͞ΕΔ *OEFYDIBOHFTBSFDPNNJUUFEUPUIF SFQPTJUPSZ git commit
  3. C0 C1 C4 C2 C3 C5 C8 C6 C7 #12

    master #13 Rebase
  4. C0 C1 C4 C2 C3 C5 C8 C6 C7 #12

    master #13 Rebase
  5. C0 C1 C4 C2 C3 C5 C8 C6 C7 #12

    master #13 $ git rebase --onto master #12 #13 Rebase
  6. $git stash $git bisect $git commit --amend $git rebase -i

    HEAD~x $git cherry-pick $git reflog tips1: Useful Commands
  7. $git stash drop stash@{x} $git stash apply [stash@{x}] $git stash

    pop [stash@{x}] $git stash list $git stash [save message] $ git stash $git stash clear
  8. $git stash drop stash@{x} $git stash apply [stash@{x}] $git stash

    pop [stash@{x}] $git stash list $git stash [save message] $ git stash
  9. $git stash drop stash@{x} $git stash apply [stash@{x}] $git stash

    pop [stash@{x}] $git stash list $git stash [save message] $ git stash $git stash clear
  10. $git reflog $git cherry-pick $git rebase -i HEAD~x $git bisect

    $git stash tips1: Useful Commands $git commit --amend
  11. $git bisect start $git bisect bad $git bisect good rev

    $git bisect next $git bisect bad/good $git bisect reset $git bisect run <test_file> $git bisect
  12. $git reflog $git cherry-pick $git rebase -i HEAD~x $git commit

    --amend $git stash tips1: Useful Commands $git bisect
  13. $git reflog $git cherry-pick $git rebase -i HEAD~x $git commit

    --amend $git stash tips1: Useful Commands $git bisect
  14. $git reflog $git cherry-pick $git rebase -i HEAD~x $git commit

    --amend $git stash tips1: Useful Commands $git bisect
  15. $git reflog $git cherry-pick $git rebase -i HEAD~x $git commit

    --amend $git stash tips1: Useful Commands $git bisect
  16. tips2: Setting [color] diff = auto status = auto branch

    = auto ui = auto [alias] co = checkout st = status -sb wd = diff --word-diff tlog = log --graph --pretty=oneline --decorate --date=short --abbrev-commit --branches hist = log --pretty=format:\"%C(yellow)%h %C(White)%ad | %C(White)%s%d %C(Red)[%an]\" --graph --date=short [merge] tool = vimdiff [core] excludesfile = ~/.gitignore