Bitbucket Server への変更のコミットとプッシュ

お困りですか?

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

コミュニティに質問

  1. Sourcetree をセットアップして Bitbucket Server を使用する
  2. Bitbucket Server での個人リポジトリの作成
  3. Clone your repository and manage files locally
  4. Bitbucket Server への変更のコミットとプッシュ

In this step you are going to make some changes to the HTML files added to your repository in Step 3. Once you make the changes and commit them you can add them to your repository on Bitbucket Server. It's not enough to just make your changes, you have to share them with the world!

Make the changes

This step explains how to make a simple change in a source file that you'll then commit locally and push to your personal repository.

  1. Open the Teams in Space.html file in a text editor.
  2. Find the <h3>Main Menu</h3> line. Within that menu, add another list item to add a link to the itinerary on the main menu. 
    (You can copy this code and add it in your HTML file).

    <li id="menu-item-65" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-65"><a href="http://localhost:2431/?page_id=60">Moon Itinerary</a></li>
  3. ファイルを保存する。

  4. Check your work by going to the Teams in Space.html file and opening it in a web browser. It should now look something like this.

Commit and push the changes

Once you've made the changes and verified they work, you'll now commit the changes and push them to your repository.

  1. Commit the changes using Sourcetree (or the command line).
    1. From Sourcetree, click on Working Copy in the upper-left. In the Unstaged files pane on the bottom, you should see the Teams in Space.html file. 
    2. Select the checkbox to left of the file. The file moves to the Staged files pane.
    3. Click Commit in the upper-left. The Commit dialog opens at the bottom.
    4. Enter a commit message in the text field (something like "This is my first commit!" would do).
  2. Push the changes to the repository.
    1. There is now an indicator within the Branches field on the left that there are changes to push, as well as on the Push button on the top toolbar. 
    2. Click the Push button, and make sure the master branch is selected, then click Ok to push the changes.
    3. You can verify the changes were pushed by going to the repository and clicking on Commits.

Do it from the command line

Commit the files you changed to your personal repository from the command line.
From a terminal window

cd website
git commit -m "Website changes"
git push -u origin master 
最終更新日: 2018 年 2 月 14 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.