gitチートシート

ブランチ操作

  • ブランチ切替

  • カレントから新しいブランチの作成

    • git branch -b hoge/fugafuga
  • 作ったブランチをremote にpush

    • git push origin hoge/fugafuga
  • リモートブランチ一覧

    • git branch -r
  • リモートブランチとってくる

    • git checkout feat/hogehoge
  • リモートブランチの削除

    • git branch -r -d hoge/fugafuga
  • カレントのブランチ名の変更

    • git branch -m 変更後の名前
  • 既に削除したリモートブランチを一覧から削除

    • git fetch --prune
  • ブランチがどこから分岐してんのか見る(masterから分岐した例)

    • git show-branch --sha1-name master feat/hoge-branch | tail -1
  • 特定ブランチのclose

コミットを書き換える

リポジトリ操作

認証

TIPS

GitHub実践入門 ~Pull Requestによる開発の変革 (WEB+DB PRESS plus)

GitHub実践入門 ~Pull Requestによる開発の変革 (WEB+DB PRESS plus)