Git Push to Bitbucket
Push Changes to Bitbucket
Let's try making some changes to our local git and pushing them to Bitbucket.
Example
<!DOCTYPE html>
<html>
<head>
<title>Hello World!</title>
<link
rel="stylesheet" href="bluestyle.css">
</head>
<body>
<h1>Hello
world!</h1>
<div><img src="img_hello_world.jpg" alt="Hello World from
Space" style="width:100%;max-width:640px"></div>
<p>This is the first file
in my new Git Repo.</p>
<p>This line is here to show how merging works.</p>
<div><img src="img_hello_git.jpg" alt="Hello Git"
style="width:100%;max-width:640px"></div>
</body>
</html>
Commit the changes:
Example
git commit -a -m "Updated index.html. Resized image"
[master 81c664c] Updated index.html. Resized image
1 file changed, 1 insertion(+), 1 deletion(-)
And check the status:
Example
git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working tree clean
Now push our changes to our remote origin:
Example
git push origin
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 16 threads
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 306 bytes | 306.00 KiB/s, done.
Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
To https://bitbucket.org/w3schools-test/hello-world.git
9940ed4..81c664c master -> master
Go to Bitbucket, and confirm that the repository has a new commit:
Now, we are going to start working on branches on Bitbucket.