Demo2: Repository Creation for Existing Project

Developed with
Start course
Duration2h 8m


Take this beginner level course on 'Atlassian BitBucket' to delve into the core principles and applied benefits for your software projects. This course made up of 8 lectures and 14 demos, will expertly teach and explain how to perform Git related tasks along with implementing and connecting BitBucket to third parties while always being aware of the various security options available.

This course would appeal to a range of job roles, including, Software Developers, Build and Release Engineers and DevOps Practitioners. All of the skills that you will gain from doing this Course will yield a tangible dividend for the projects with your enterprise; allowing you to use, control and manage BitBucket to manage and maintain your software products.

Learning Objectives 

  • Understand the basic principles of version control as implemented using the Git protocol and
  • Learn how to effectively use BitBucket to manage and maintain your software projects
  • Assess the benefits of using BitBucket to manage and secure your software engineering assets
  • Recognize and explain how to perform all basic Git related tasks such as creating and cloning a repository, branching, and merging.
  • Study to implement and connect BitBucket with other 3rd party systems 
  • Be aware of the different security options available to secure your BitBucket setup
  • Be able to use, control, and manage BitBucket through either using the web-based administration console and/or by using a git client.

Intended Audience

  • Software Developers 
  • Software Build and Release Engineers
  • DevOps Practitioners


To be able to get the most out of this course we recommend having a basic understanding of:

  • Software development and the software development life cycle
  • Software development tools
  • Version control and associated workflows

Related Training Content

After completing this course we recommend taking the 'Introduction to Continuous Integration' Course

To discover more content like this, you will find all of our training in the Cloud Academy Content Training Library.


Okay, welcome back. In this demonstration we're going to do the same as the first, but instead we're going to assume that our project directory on the file system locally has already been populated with our programming assets, or coding files, So, lets start. So, within Bitbucket we'll create another repository. This time we'll call it CADemo2. Again, make sure that the version control system is set to Git and click the Create Repository button. Again, Bitbucket in the background has gone ahead and successfully created our new repository, and it's empty. So last time, we took the https git clone URL, and then jumped into the terminal. We're not going to do this, this time. Instead, this time from within the terminal, we're going to create a directory. So this time we'll create cademo2. We'll navigate into it. And we'll copy the file that we created in the other demonstration from cademo into this directory. So we don't want to copy the directory, we want to copy the file, which is index.html. Okay. Listing the contents of this directory, we've got index.html. We'll run git init to initialize the directory as being version controlled. Do file listing again. You can see here that the output of this command was to generate our special .git directory. And this is the magic where we connect this directory back up to our new CADemo2 git repository. 

By running the command git remote add origin, because we're setting the repository as the origin. We'll jump back into our new repository, and this time we'll just copy this portion back into our terminal. Paste. Enter. Okay, so that's successfully set the new repository within Bitbucket as the origin. And then we can simply push our contents up by doing a git push -u to the origin in the master branch. Enter. Okay, apologies. We haven't actually staged or committed anything. So if we did a git status, you'll see that we've got an untracked file. So we need to do a git add index.html, then commit it, or do git status again. You can see now that we've got our new file. Here, we'll do a git commit, set the message, this time we'll use the message initial commit. Enter. And this time we run our command git push -u to the origin in the master branch. And excellent. So let's push up. So we jump back into Bitbucket. We'll do a reload. And again, we've successfully pushed our changes up. So, the difference of this demonstration was instead of cloning down into an empty directory, we simulated an existing software directory with assets within it, and then we committed to our local repository and pushed up to the origin. Okay, that completes this lecture. Go ahead and close it, and we'll see you shortly in the next one.

About the Author

Learning paths9

Jeremy is the DevOps Content Lead at Cloud Academy where he specializes in developing technical training documentation for DevOps.

He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 20+ years. In recent times, Jeremy has been focused on DevOps, Cloud, Security, and Machine Learning.

Jeremy holds professional certifications for both the AWS and GCP cloud platforms.

Covered Topics