Git のフィーチャー ブランチ ワークフロー

Git のフィーチャー ブランチ ワークフローを使用して、Bitbucket で同僚との作業を効率的に開始できます。このワークフローでは、メインの master ブランチから伸びる各ブランチに、すべての機能開発タスクが割り当てられます。これによって、複数の開発者がメイン コードに触れることなくそれぞれの機能開発に取り組めます。

ブランチの図

master ブランチで作業を開始する

このワークフローは、2 人以上のグループでコードに対して共同で取り組む場合に役立ちます。Bitbucket とローカル リポジトリが同期されているのを確認したら、ワークフローを開始しましょう。

次を作成する: new-branch

Use a separate branch for each feature or issue you work on. After creating a branch, check it out locally so that any changes you make will be on that branch. Learn more

更新後、変更を追加、コミット、およびプッシュする

Work on the feature and make commits like you would any time you use Git. When ready, push your commits, updating the feature branch on Bitbucket. Learn more

コードのレビューを依頼する

To get feedback on your code, create a pull request in Bitbucket. From there, you can add reviewers and make sure everything is good to go before merging. Learn more

フィードバックを解決する

同僚がコメントを追加して、コードを承認しました。コメントをローカルで解決して、変更を Bitbucket にコミットおよびプッシュします。更新内容がプル リクエストに表示されます。

プル リクエストをマージする

Before you merge, you may have to resolve merge conflicts if others have made changes to the repo. When your pull request is approved and conflict-free, you can add your code to the master branch. Merge from the pull request in Bitbucket. Learn more


このページではフィーチャー ブランチ ワークフローの使用方法のみを説明していますが、ブランチやプル リクエストの使用方法は Gitflow などの他のプロセスでも利用できます。Gitflow やその他の Git ワークフローの説明については、アトラシアンの Web サイト「きっとできる Git」をご参照ください。

さらにヘルプが必要ですか?

アトラシアン コミュニティをご利用ください。