Demo 10: Snippets for Code Segment Sharing

Developed with
Atlassian
play-arrow
Start course
Overview
DifficultyBeginner
Duration2h 8m
Students96
Ratings
3.6/5
star star star star-half star-border

Description

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

Prerequisites

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.

Transcript

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

Students7756
Labs21
Courses58
Learning paths12

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