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

Git Hands-On

Git Hands-On

新卒エンジニア研修で使った資料です。

Kenichi Takahashi

October 01, 2014
Tweet

More Decks by Kenichi Takahashi

Other Decks in Programming

Transcript

  1. mkdir bin ! echo "\!#/bin/sh\n\ngit diff -- staged" > bin/git-ds

    ! chmod +x bin/git-ds ! PATH=./bin:$PATH git ds
  2. git checkout HEAD~ echo 'hello antipop' >> README.md ! git

    add -u git commit -m 'Lost commit' ! git log --oneline --decorate ! git checkout master ! git log --oneline --decorate
  3. echo 'hello hsbt' >> README.md ! git diff ! git

    add -u ! git commit -m 'Hello hsbt'
  4. echo 'Konichiwa Rails' >> README.md ! git diff ! git

    add -u ! git commit -m 'Konichiwa Rails' ! git log --oneline --decorate
  5. touch History.md ! git add History.md ! git commit -m

    'Create History.md’ ! git log --oneline --decorate !
  6. git checkout -b hello-swift ! echo 'Hello Swift' > Swift.md

    ! git add Swift.md ! git commit -m 'Add Swift.md'
  7. git checkout master ! echo 'Hello Android' >> README.md !

    git add -u ! git commit -m ‘Hello Android'