Git Bitbucket Pages
Host Your Page on Bitbucket Cloud
With Bitbucket Cloud, Bitbucket allows you to host a webpage from your repository. Let's try to use Bitbucket Cloud to host our repository.
Create a New Repository
Start by signing in to Bitbucket. Bitbucket Cloud needs a special name and setup to work, so we start by creating a new repository:
This repository needs a special name to function as a GitHub page. It needs
to be your Bitbucket username/workspace ID
, followed by
.bitbucket.io
:
Push Local Repository to Bitbucket Cloud
We add this new repository as a remote for our local repository, we are calling it
bb-cloud
(for Bitbucket Cloud).
Copy the URL
from here:
And add it as a new remote
:
Example
git remote add bb-cloud https://w3schools-test@bitbucket.org/w3schools-test/w3schools-test.bitbucket.io.git
Make sure you are on the master
branch
, then push the master
branch
to the new remote
:
Example
git push bb-cloud master
Enumerating objects: 31, done.
Counting objects: 100% (31/31), done.
Delta compression using up to 16 threads
Compressing objects: 100% (31/31), done.
Writing objects: 100% (31/31), 93.80 KiB | 15.63 MiB/s, done.
Total 31 (delta 17), reused 0 (delta 0), pack-reused 0
To https://bitbucket.org/w3schools-test/w3schools-test.bitbucket.io.git
* [new branch] master -> master
Note: If this is the first time you are connecting to Bitbucket, you will get some kind of notification to authenticate this connection.
Check that the new repository has received all the files:
That looks good, now use the repository name as an URL in your broweser to view the result!