ブランチを作成してプッシュする
ブランチを利用すると、メインのコードベースに影響を与えずに新しい機能の作業に取り組むことができます。変更を行った後、そのブランチを Bitbucket Cloud にプッシュしてプル リクエストでのレビューを依頼できます。
Git ブランチの作成
Git ブランチを作成するには、Bitbucket を使用することをおすすめします。
リポジトリから [作成] ボタンを選択します。
ドロップダウン メニューの [このリポジトリ] セクションで、[ブランチ] を選択します。
From the popup that appears, select a Type (if using the Branching model), enter a Branch name and select Create.
注: Bitbucket または Jira の課題からブランチを作成するたびに、Bitbucket は参照、ファイル システム、またはシェルから無効な文字を削除して、有効な代替文字に置き換えます。
ブランチを作成したら、ローカル システムからブランチをチェックアウトする必要があります。Bitbucket では、次のコマンドに似たフェッチおよびチェックアウト コマンドを使用できます。
$ git fetch && git checkout <feature>ローカル側で変更を行ってから、その変更を追加およびコミットし、
<feature>ブランチにプッシュします。$ git add . $ git commit -m "adding a change from the feature branch" $ git push origin <feature>Select the Source page of your repository. You should see both the
mainand the<featurebranch in the branches dropdown. When you make commits to the feature branch, you'll see the files specific to that branch.
この内容はお役に立ちましたか?