Skip to content

Instantly share code, notes, and snippets.

@taka328w
Created April 25, 2012 01:44
Show Gist options
  • Save taka328w/2485391 to your computer and use it in GitHub Desktop.
Save taka328w/2485391 to your computer and use it in GitHub Desktop.
【案】githubを使った開発
【参考】
http://d.hatena.ne.jp/hnw/20110528
【事前準備】
1. forkする
githubのページから
2. fork元の変更を取り込めるようにremote add
git remote add upstream git://github.com:328w/XXXX.git
3. forkしたリポジトリをローカルにclone
git clone git://github.com:USERNAME/XXXX.git
【開発】
※masterはfork元追従用にのみ使う
1. 作業用ブランチを作る
git checkout -b BRANCH_NAME
2. 開発&テスト
3. fork元の変更に追従&テスト
git checkout master
git pull upstream master
git push origin master
git checkout BRANCH_NAME
git rebase master
4. リモートブランチへpush
git push origin BRANCH_NAME
5. pull request
・githubのページから
・レビューの指摘点はgithubに書き込みます。その後の作業はどうなるんだろう…。
6. fork元に取り込まれたらローカル/リモートブランチの削除
・ローカルブランチの削除
git branch -D BRANCH_NAME
・リモートブランチの削除
git push origin :BRANCH_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment