LoginSignup
12
12

More than 5 years have passed since last update.

github-flow

Posted at

git-flow は複雑で苦労だったので。github-flowなるものは簡単。

基本

  • リリース可能なブランチは master のみ!

  • 開発は全て 最新の masterからブランチを作成する

git pull origin master
git checkout -b feature master
  • 作成したブランチはローカルコミット後、定期的にリモートにpushする
git push origin feature
  • 完了後masterへの Pull(Merge) Request を送る

原則禁止事項

  • ソース修正していきなり master に push
git push origin master

リモートリポジトリのmasterブランチは管理者以外はpush禁止にしたほうがよい。

さらに事故防止設定

git config --global --add push.default nothing

補足

  • masterの変更を取り込むのは rebase
git rebase master

ブランチ側のコミットが変わってしまうのが恐いケースならば merge

git merge master
12
12
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
12