リポジトリに変更をプッシュする
Once you make changes to your files and commit to your local repository, you'll need to push them to the remote Bitbucket Cloud repository so that other people can see them too.
リポジトリにプッシュするには、そのリポジトリへの書き込みアクセス権限が必要です。プッシュができず、アクセス権を持っていないと思われる場合は、リポジトリ管理者にアクセス許可を依頼してください。
Git リポジトリにプッシュする方法
コマンド ラインで、リポジトリ ディレクトリに移動していることを確認します。
コマンド ラインで「
git push
」と入力してコミットをローカル リポジトリから Bitbucket にプッシュします。プッシュ先を明確に指定したい場合は、「git push <remote_server> <branch_name>
」と入力します。このコマンドは次のようにプッシュ先を指定します。remote_server
— リモート サーバーの名前。ほとんどの場合、origin
は Bitbucket にプッシュしようとしていることを示します。branch_name
— 変更を加えた、プッシュ対象のリポジトリ ブランチ。ブランチを使用すると、メインのコードベースとは別のリポジトリで、一連のコードの作業を行うことができます。
認証を求められたら、Bitbucket のユーザー名とパスワードを入力します。
この例では、origin
がリモート サーバー、master
がプッシュするブランチです。$ git push origin master
Password:
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 23.98 KiB, done.
Total 4 (delta 0), reused 0 (delta 0)
remote: bb/acl: alui is allowed. accepted payload.
To https://alui@staging.bitbucket.org/alui/alui-git-fork.git
0ad86b3..395d3c2 master -> master
ブラウザで Bitbucket リポジトリを開きます。[コミット] タブに最近のコミットが表示されます。