Bitbucket でリポジトリから変更をプルする
宇宙ステーションの管理アクティビティにおける次の作業として、新しい物資のリクエストを登録する必要があります。Bitbucket 宇宙ステーションに物資を送るためのシステムをセットアップしましょう。Bitbucket と Sourcetree の知識があと少しあるだけで、今後数年にわたって宇宙探索をサポートできます!
ステップ 1. Bitbucket でのファイルの作成
サプライ リクエスト ファイルを追加するには、以下の操作を行います。
From your BitbucketStationSupplies in Bitbucket, select Source to open the source directory. Notice you only have one file,
supplies.txt, in your directory.2. From the Source page, select the … (More options) button in the top right corner and select Add file from the menu. The More options button only appears after you have added at least one file to the repository.
This opens a page for creating the new file with the option to add the file to a different branch.Enter
supplyrequestin the filename field .Select HTML from the Syntax mode list.
テキスト エリアに次の HTML コードを追加します。
<p>We are requesting additional supplies. Please send us the following:</p>
<ul>
<li>space ice cream</li>
<li>nerf darts</li>
<li>telescope light shield</li>
</ul> 6. Select Commit. The Commit message field appears with the message: supplyrequest created online with Bitbucket.
7. Select Commit under the message field.
You now have a new file in Bitbucket, and are taken to a page with details of the commit to view the changes.
If you want to see a list of the commits you've made so far, select Commits in the sidebar.
ステップ 2. リモートリポジトリから変更をプル
次に、そのサプライ リクエスト フォームをローカル システムに送る必要があります。プロセスは非常にシンプルで、基本的に、supplies.txt ファイルを Bitbucket に送る際のプッシュと反対の操作になります。
ファイルをローカル リポジトリにプルするには、次の操作を実行します。
Open your repository in Sourcetree, and select the Pull button.
Bitbucket からローカル リポジトリへのファイルのマージを示すポップアップが表示されます。
Select OK from this box. Sourcetree updates with a description of the merged file.
ローカル システムのリポジトリ フォルダに移動すると、追加したばかりのファイルが表示されます。
おめでとうございます!これで、Bitbucket とローカル システム間の基本的な DVCS ワークフロー (クローン、追加、コミット、プッシュ、プル) を終了しました。
この内容はお役に立ちましたか?