Demo 10: Snippets for Code Segment Sharing
Start course
2h 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.


Welcome back. In this demonstration we'll take a quick look at Bitbucket Snippets. So, for starters, let's navigate into our repository, CADemo3. Then, we'll click the create button. This time, we'll create a snippet. So, snippets are useful for sharing code segments, and/or files, within your team, or just for yourself. So, we'll give our snippet a title. In this case, we're going to call it Dotnet Startup Script. From the title, as you guessed, it's going to store some Dotnet code. So, we'll jump over to our Finder, and I'm in a Dotnet core project that I've previously created, and I can simply drag and drop. I can drag multiple files. And then Bitbucket will actually detect the syntax, or the language, of the file, and then will conveniently colorize the code for us. So you can see here, we've got our two files, Startup.cs, which is a C# file, and it's been detected as such. 

Likewise, with our Program.cs C# file. So again, under settings we can specify it to be created under a particular Bitbucket user. In this case, myself, and we'll set the repository type to use Git, and we'll change the permissions to private. Clicking the create snippet button simply creates our snippet. So that's now available, and we can edit. So, we'll give it a constructor... ...note. And we can save. Now we can look at revisions. Here we can see that latest revision, we made a change. We added a Dotnet comment. So, that covers snippets. An easy way to share code segments with the wider team. Okay, that completes this demo, go ahead and close it, and we'll see you in the next one.

About the Author
Learning Paths

Jeremy is a Content Lead Architect and DevOps SME here at Cloud Academy where he specializes in developing DevOps technical training documentation.

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

Jeremy holds professional certifications for AWS, Azure, GCP, Terraform, Kubernetes (CKA, CKAD, CKS).