Confessions of a Git wallflower, and other stories about Bitbucket

By on June 30, 2017

This post comes from Abhishek Sharma, a Masters of Science student at the University of Southampton and member of Bitbucket’s Student Amabassador team.

“Code collaboration on steroids” — this is how Atlassian describe Bitbucket on their site. And this is exactly what I experienced first-hand when I lost my Git virginity after being introduced to Bitbucket in September last year. I’ll tell you the story in a moment, but if you’d prefer to just cut to the chase…

Anyone can use Bitbucket for free. But university students and staff can upgrade to the premium offering at no extra charge (take that, student debt!). There’s a party going on over here, and you’re all invited.

So. On with my story.

For one of my Master of Science modules in the first semester, we were tasked with a group project. I know, I know… the dreaded group project. We had to create a trading agent that could perform the bidding strategy of advertising networks in the AdX TAC (a virtual platform for simulating an ad exchange marketplace) by automatically placing ad bids that would ensure the largest revenue and profits are generated by winning as many campaigns as possible – preferably big campaigns. We also had to minimise the costs incurred to fulfill said campaigns.

My group’s agent would then compete with 24 other agents in a 7-hour trading competition where, despite our best efforts, it would end up placing 14th. Simply because we opted for a rational strategy instead of exploiting the randomness factor in the competition… but that is a discussion better left for another day.

So, after an endless amount of reading and understanding what it is we were required to do, one of the members (who also happens to be one of the most hard-working people I’ve had the pleasure of befriending in my short life so far) of our team recommended we use Bitbucket to manage our project.

Now, at the time, I was only familiar with GitHub and thought of it as just a means for finding similar projects to whatever coding assignment I may be working on at that point. Creating an actual repository and collaborating with others on a big project like this was the equivalent of walking into a department mixer where everyone knows each other’s names – except you.

Not to mention that I had never worked on a group coding project before, let alone use a Version Control System (VCS) to manage it. Not surprisingly, the whole situation so overwhelmed by my brain that I started second-guess my coding skills and even my decision to pursue a MSc in the first place. My teammates were doing the Git equivalent of drinking me under the table.

Thankfully, however, they were kind and patient enough to put up with my inexperience. They answered all the stupid questions I asked regarding Bitbucket, Git, and the project in general – thus helping me realise the importance of Git in the process.

Once the project was over and submitted, I realised just how insignificant my contributions had been thanks to my lack of experience with Git. It was around this point when I strolled across the Bitbucket tutorials. Through them, I finally learnt how to create a repository via the Git terminal rather than creating one directly from the Bitbucket site. Yes: despite having an undergraduate degree in software engineering, I had so little exposure to Git that even being able to use Git Bash to do simple things like clone, pull, and push commits was mind-blowing for me.

Fast-forward to today, and the tutorials have made me so confident using Git that the first step I take now before embarking on any coding venture is to create a repository. Not only does this allow me to make my projects available to potential collaborators, it also helps me direct potential employers to the coding projects I have worked on (or am currently working on). It’s nice to be able to prove that I truly possess the technical skills I claim to have on my resume.

Although it is through Bitbucket that I learnt (and am currently in the process of mastering) the wonders of Git, most of my projects are currently based on GitHub right now. But I’ve already started migrating these to Bitbucket and make that my primary tool for project management.

Why, you ask? Well, it’s simple. The free version of Bitbucket offers loads more features to play with than the free version of GitHub.

For example, Bitbucket have recently introduced a feature called code-aware search, which is an easy way to comb through large repositories and code bases. As a bonus, it forces you to get into the good habit of writing good, reusable code so that the semantic search algorithm used by the feature can return results in a ranked format. From what I know, GitHub does not offer this (or maybe you have pay for it).

Also, Bitbucket offers free academic licenses for students and professors, which lets you create unlimited repositories (both public and private) along with the ability to add an unlimited amount of collaborators. Seriously. It’s free, as long as you are a student at one of the academic institutions that Bitbucket offers these licenses to. And if your school isn’t on their list yet, you can get on the list here.

So that’s my story. I’d spent my entire undergrad career knowing that there’s this massive party called Git that everybody was going to, but too shy (and/or) busy to get myself invited to it. Thank you, Bitbucket, for pulling me in.


Calling all university students and professors! Learn how Bitbucket’s free academic license program can help your next project or class.

Git educated (see what we did there?)


Faster builds with dependency caching

By on June 27, 2017

One of the key principles behind the design of Pipelines was quick developer feedback on changes committed. After all, machines are cheap but your developers’ time isn’t. This principle influenced how we chose to price pipelines to provide unlimited concurrency, so builds aren’t waiting in a queue. Running builds in Docker containers also means your build scripts start executing much sooner than running them on VMs.

With most languages, builds start by downloading dependencies, accounting for a significant time of each build. Between each build, dependencies seldom change and when they do, it is usually incremental. Builds can be faster if dependencies don‘t need to be downloaded each time.

Today, we are excited to announce that Pipelines supports caching between builds. For early adopters in our Alpha group, we have seen builds reduced by up to 50% in build time (and build minutes)!

Adding a cache is simple. Here’s an example for adding a cache for node_modules.

image: node:8
    - step:
          - node
          - npm install
          - npm test

We’ve pre-defined caches for several popular build tools. If your build tool doesn’t have a pre-defined cache, you can still define a custom cache in your bitbucket-pipelines.yml file. Caches are per repository and can be shared between your pipelines.

With this addition, we hope your developers are waiting less and coding more!

Enabled caching already? Tell us on Twitter @Bitbucket how much it has shaved off your build time.

New outbound IP addresses for webhooks

By on June 21, 2017

Bitbucket webhooks are used by teams every day to test, analyze, deploy, and distribute great software to millions of people.

In a few weeks, we will be making a change to our network configuration that results in these services routing through different IP addresses. We plan to make this change no earlier than Monday July 10th.

If you’re using webhooks and have firewall rules to allow Bitbucket to communicate with your servers, you’ll need to add the new IPs to your rules before Monday July 10th.

The current source IP address range is:

The new source IP addresses will be:

As always, you can consult our documentation for the current list of supported IPs for webhooks.

New in Bitbucket Server 5.1: Signed commits, PR deletion, and more

By on June 7, 2017

Last month we announced the beginning of our Bitbucket Server & DC 5.x series with an enhanced focus on helping our customers achieve DevOps success. Today we’re taking aim at the management side of DevOps by making the administration of your development toolset easier with Bitbucket Server and Data Center 5.1.

Keep reading to learn about GPG signed commits, pull request deletion, and other new features in 5.1.

Download Bitbucket Server 5.1

GPG signed commits

For those practicing DevOps, Git has become the preferred version control system for its flexibility and speed. This flexibility is powerful but also extremely hard to control without a tool like Bitbucket. For organizations who need to run a tight ship (e.g. adhering to regulatory requirements), Bitbucket’s permissions, merge restrictions, and hooks help immensely. Today we’re adding an additional security measure with the Verify Commit Signature hook, which rejects all commits that are not signed with a GPG public key. Coupling this with the committer verification hook, you can be assured that all the commits in Bitbucket are valid and secure. To learn more about toggling hooks on and off, see our repository hooks guide.

Pull request deletion

Next up is a highly requested improvement to our pull request workflow, the ability to delete them. Have you ever created a pull request by mistake? Or found a pull request to be obsolete? In Bitbucket Server 5.1, irrelevant pull requests can now be deleted instead of declined, leaving your PR history nice and clean. Pull request deletion is now enabled by default for pull request authors and repository administrators.

Disable Pull Request

Search improvements

Last year we brought code search to Bitbucket Server, allowing teams to search for code across all repositories stored in Bitbucket.

For teams making extensive use of forks, the process of building an index for search can use a fair amount of disk space. In Bitbucket Server 5.1, we’re introducing a way for administrators to keep search disk space under control by limiting what actually gets indexed. For example, you can restrict the index process to exclude synced forks, which reduces disk space and provides refined search results.

In addition, we’ve also updated our Elasticsearch guides for Data Center customers, providing more guidance on deploying an Elasticsearch instance.

Download Bitbucket Server 5.1

One more thing: In Bitbucket Server 5.1, we’re laying the foundation for project level settings, allowing project admins to configure items, such as branching model and permissions, across all repositories in a project. To learn more about project level settings and other improvements and bug fixes in 5.1, see our release notes.

Speed up your builds with Pipelines command duration

By on May 31, 2017

Every team wants fast feedback from their CI system, which is why we’ve just added command durations to all Pipelines builds. Knowing which parts of your build take the longest gives your team the information to speed up your build and shorten your team’s feedback loop.

You can now see the duration for each command directly in the Pipelines log viewer. We’ve picked a consistent duration format for quick scanning, so your team can easily work out where your build time is going.


So what are you waiting for? Get building with Pipelines and make your build the fastest it can be.

Links in Bitbucket Pipelines logs

By on May 23, 2017

Here’s a small but useful improvement we added last month to Bitbucket Pipelines. You no longer need to copy and paste URLs from logs into your browser as Bitbucket will automatically turn them into links. Convenient for jumping to your deployed application!

links in logs

Try Bitbucket Pipelines

Document changes with required issue keys in Bitbucket Cloud

By on May 16, 2017

“Why was this change made again?” Issue keys referenced in commit messages help answer this question by providing a link with more context around why a particular change was made. They’re useful for everyone from new team members getting their bearings with a repo, to quality engineers reviewing the latest release, or a budding startup getting back to their weekend project.

Issue key references are so important that some teams need every commit to include a reference. These teams rely on issue keys to maintain diligent documentation or to automatically generate release notes or changelogs to verify every change. Historically, they could do this with pre-commit Git hooks on each developer’s machine to validate messages, but this solution adds a layer of overhead that becomes difficult to manage. For these organizations, we’re introducing the ability to require issue keys for commits in Bitbucket Cloud.

Required issue keys in Bitbucket Cloud

Requiring issue keys ensures each change links to an issue in commit messages. Bitbucket automatically converts mentioned issue keys (e.g. ‘PROJ-1234’ or ‘#1234’) into links to your issue tracker so it’s easy to stay coordinated between a change and its backstory.

Issue keys aren’t just a reference. They can be used to automate workflow actions: you can add comments or transition an issue to a different state just by mentioning it, making it easier for your team to go back historically for validation of changes. If you combine this with the new JIRA issue details view, you can view and comment on JIRA issues without even leaving Bitbucket. As a result, including issue keys has become a best practice and requiring them in commit messages will make it easier to scale your workflow.

Get started with required issue keys

If you’re new to Bitbucket, sign up for a Bitbucket Cloud account. If you’re an existing Bitbucket user and are already using JIRA Software, make sure it’s connected to Bitbucket. This connection enables Bitbucket to automatically link to your JIRA Software issues. If you’re using the Bitbucket issue tracker, issues are already linked automatically.

Then, navigate to the “Links” section of your repository settings and enable “Require issue keys in commit messages.”

Once enabled, Bitbucket will only accept pushes to your repo if all pushed commit message contain issue keys.

Once all commit messages include keys (e.g. using interactive rebase to update the message), the push will succeed, and the issue keys are automatically linked across Bitbucket, like in this pull request.

Try Bitbucket, it’s free

Not using JIRA Software and Bitbucket together?

JIRA Software is the preferred issue tracker of over 350,000 Bitbucket teams. Teams who have JIRA Software and Bitbucket integrated release 14% more often and close 23% more issues (when compared to teams using just one of those products).
Learn more.

Have more specific questions about this post? Reach out to us on Twitter to get the information you need.

#Forthecode that does amazing things.

By on May 9, 2017

Bitbucket’s mission is to help teams solve real-world problems and accomplish their unique goals to change the world. Our customers select Bitbucket because it supports professional teams building things with a purpose. We get inspired hearing about all the ways our customers are using our products to move our world forward.

We want to share what you’re doing with the rest of the world. Join our #Forthecode program and share your company’s mission and all the hard work done to accomplish it.

#Forthecode contest

Share your company’s mission for a chance to be featured on our blog, our social media channels, and win some pretty cool swag! 

How to enter:

Click on the Tweet button below and tell us how you’re using @Bitbucket to accomplish your company’s mission with the hashtag #Forthecode.

For example, Atlassian’s mission is to unleash the potential in every team. We would tweet: “@Atlassian uses @Bitbucket #Forthecode that unleashes the potential in every team.”

To kick us off, check out some of the awesome ways our customers are using Bitbucket to accomplish their mission.

@Trulia uses @Bitbucket #Forthecode that finds your next home.

Bitbucket helps Trulia on large-scale agile development to provide home buyers and sellers essential information about the real estate market.

@Splunk uses @Bitbucket #Forthecode that makes big data, easy. 

Bitbucket helped Splunk transition to Git and develop software that makes big data scalable and usable.

@Orbitz uses @Bitbucket #Forthecode that takes you on your next vacation.

Bitbucket helped Orbitz migrate to Git to develop the world’s leading online travel site.

What will your code do?

Tell us how you’re using @Bitbucket to accomplish your mission using hashtag #Forthecode or give Bitbucket try today!

Try Bitbucket, it’s free

Introducing code aware search for Bitbucket Cloud

By on May 2, 2017

Code aware search

Save time combing through usage results with a semantic search that ranks definitions first over usages or variables names. Sign up for Bitbucket Cloud to take it for a spin.

Get started, it’s free

The search for code search is finally over: Bitbucket Cloud is launching code aware search, specifically built for teams who have many repos or large code bases.

What makes Bitbucket Cloud’s search “code aware”? Rather than simply indexing your code as text, we built a semantic search that has our systems do the grunt work for you. Bitbucket Cloud analyzes your code syntax, ensuring definitions matching your search term are prioritized over usages and variable names. Assuming your team is re-using code effectively, the ratio of usages to definitions will increase as your codebase grows, making this a big time saver on larger projects.

For example, if you search for “FastHashMap”, which document would you want to appear first?

public class FastHashMap {
   /* ... */


public class SomeOtherClass {
    public void doSomething() {
        FastHashMap fastHashMap = new FastHashMap();

You’d prefer the class definition, right? Let’s take a deeper look at how we built our code aware search to provide the most relevant search results at a fast pace.

How code search works in Bitbucket Cloud

Search indices built using traditional text indexers will usually return the usage result first because it contains a higher number of exact matches for your search term. In code bases where the same class or function is used many times, developers are often left trawling through page after page of usage results trying to hunt down the definition.

We took a different approach: by boosting the definitions matching your search term, the result you want is likely to rank much higher (usually #1) in the search results. Our algorithm boosts definitions for a wide range of type categories including classes, functions, enums, structs, and interfaces.  We prioritized building a code aware search scoped to team and user accounts over a global search functionality. This way, we hope to quickly give our users the relevant results they want instead of the hassle of checking out a repo locally and searching using an IDE.

To compare this live, you can search for the common class “QueryBuilders” on the Elasticsearch repo. In GitHub, it shows up as the 6th result on the 18th page (at time of writing). In Bitbucket Cloud, the class definition shows up as the first result.

Languages, filters, and operators

Code aware search outperforms traditional search approaches for statically typed languages like Java that tend to repeat type names when importing, declaring, and instantiating types. However Bitbucket Cloud’s code aware search is also highly effective for a range of other popular languages including JavaScript, Python, Ruby, and PHP, among others.

Since code aware search is built for source code, we also index  . and _ that are commonly used in identifiers. This means you can get more precise results for compound search terms such as class, function, and variable names like “foo_bar.baz”.

Additionally, we allow you to restrict search results by using modifiers and operators. You can use modifiers to filter by a particular language or file extension (like “ext:css” or “lang:ruby”) or limit search to specific repos (repo:elasticsearch). Projects can use operators (like AND, OR, and NOT) to narrow down or broaden results in case you get too many.

For a full list of the capabilities and search query considerations with code search in Bitbucket Cloud, check out our documentation.

Try Bitbucket Cloud’s Code Aware Search

If you’re ready to use a fast and relevant code search, sign up for a Bitbucket Cloud account, create a repository, and index your code. If you’re already a Bitbucket customer, you can find code search in your sidebar and further documentation on it here.

Get started, it’s free

Have more specific questions about this post? Reach out to us on Twitter to get the information you need.

Bitbucket Server 5.0 & Bamboo 6.0: Bringing DevOps to the Enterprise

By on

According to our recently released DevOps Maturity Report with xMatters, 43% of respondents in organizations of 1000 or more said they either didn’t know of or didn’t have a DevOps initiative in place. With proven benefits like faster time to market and better release quality, why aren’t more enterprises embracing DevOps?

The answer is simple: changing the way teams work isn’t easy. For teams of all sizes, the journey to DevOps can be fraught with roadblocks. For those in the enterprise, challenges like lack of visibility, deep-rooted cultural silos, disconnected tools, and complicated compliance requirements are magnified, making DevOps adoption nearly impossible.

For years, Bitbucket Server and Bamboo have been tackling these challenges, helping software teams build better software faster. Today we’re taking it up a notch with Bitbucket Server and Data Center 5.0 and Bamboo 6.0, giving development teams the freedom, speed, and automation they desire while meeting the demanding needs of their enterprise organization.

DevOps for the enterprise

Adopting DevOps in the enterprise is more than just better communication across operations and development, modern continuous integration practices, or the type of version control in place. Things like compliance and scale become just as important. Tooling must provide freedom and structure, scalability and performance – things that are not often found together.

Atlassian tools have the unique ability to make DevOps workflows a reality while ensuring traceability, availability, and security all remain intact. In Bitbucket Server and Data Center 5.0, and Bamboo 6.0 we’re upping the ante with a committer verification Git hook and updates to smart mirrors.

Committer verification

Git and distributed version control have many benefits out of the box, but controlling access and workflows isn’t one of them. For example, without a Git management tool, a developer can push commits that others have written to the central repository.

This creates problems for organizations with strict security and compliance requirements. Bitbucket lets you address this through permissions and workflow controls including Git hooks. In 5.0, we’ve added a new committer verification hook, which enforces that only the author of a commit can push those changes back to Bitbucket Server or Data Center. Now you can sleep easy knowing that only authorized code changes can make it to your repositories.


Smart mirroring gets smarter

Smart mirroring in Bitbucket Data Center is a hassle-free way of providing geographically dispersed teams a read-only copy of the repository. By pulling updates from a local mirror, teams can avoid the pain of high-latency and low-bandwidth clone operations. All authentication, permissions, and updates are controlled by the master data center instance keeping admin maintenance to a minimum.

In Bitbucket Data Center 5.0 we’re introducing authentication caching – a way for end users to maintain mirror access even in the event of short outages. Instead of communicating to the main server for every login event, credentials are now cached on the mirror for 5 minutes at a time. If network connection is patchy or the main server is offline, users can still fetch/clone using the cached credentials. You can rest easy knowing that Bitbucket Data Center’s active-active clustering, disaster recovery, and now authentication caching ensures your code will always be available.

Productivity at scale

With DevOps, development teams boost productivity through workflow automation, tighter communication across teams, and easier access to information (e.g. build and development status on JIRA issues and pull requests). Bitbucket Server & Data Center 5.0 and Bamboo 6.0 bring these key elements to the enterprise with more transparency and modernization of the release pipeline.

Bamboo Specs

First up, we’re modernizing the way builds are configured with Bamboo Specs, the ability to define Bamboo plan configurations as code. Changing build configurations no longer requires edits in the Bamboo user interface, instead configurations can be stored as code. Beyond simplifying application build, defining plan configurations as code provides benefits such as code reuse, proper code reviews, versioning, and so on. The best part? Bamboo Specs is native to Bamboo, no plugins or additional duct tape required.

Bamboo Specs

Did you know you can use our Bamboo Specs exporter feature to automatically create a Spec out of your existing plans? Learn more

Tighter integrations between Bitbucket Server and Bamboo

Next up we’re breaking through silos and introducing tighter integrations between Bitbucket Server, Bamboo, and JIRA Software Server. Development teams already benefit from tracking work items through JIRA Software to commits and pull requests in Bitbucket Server, and builds and deployments in Bamboo.

Traditionally, the link between JIRA Software and Bitbucket has been on the commit level (i.e. commit A pertains to JIRA issue ABC-123). In Bitbucket Server 5.0 we’re adding repository level shortcuts allowing teams to connect a repository to any related asset, like a JIRA project. Repository shortcuts make it easy for everyone on the team to find and jump to repository information. Simply link to your JIRA board, Confluence space, Bamboo plans, HipChat room, or whatever else that’s important to you.


Bamboo’s integration with Bitbucket Server is also getting an upgrade. Currently, we display build status (e.g. pass/fail) on related commits, branches, and pull requests in Bitbucket Server, but teams were unable to see Bamboo builds in-progress or trigger builds on pull request creation. With the addition of in-progress build status and pull request aware builds in Bamboo, developers gain more control over when their builds kick off and can monitor progress from inside Bitbucket. This frees up Bamboo build agent resources and cuts down on unnecessary build noise. Even better, if you’re not using plan branches already, now you can, and know that every pull request will get built. For more information on all of the Bitbucket Server and Bamboo integration enhancements, check out our integration guides.

PR aware builds

… there’s room for some fun too

Productivity at scale isn’t all integrations and workflow. In Bitbucket Server & Data Center 5.0, let your team know how you really feel with emoji and HipChat emoticon support for comments. To look for the perfect emoji type ” : ” which brings up the list of available options.

Making DevOps in the enterprise possible

Changing the way your teams work, adopting new tools, and learning new technologies is hard and doesn’t happen overnight. When you add disconnected tools, complicated compliance requirements, and scalability to the mix it makes “going DevOps” that much more difficult. No matter where you are in your DevOps journey, Atlassian provides the guidance and tools to help you succeed. If you’re ready to modernize your version control and continuous integration practices, give Bitbucket Server/Data Center and Bamboo a try.

Download Bamboo 6.0


Download Bitbucket Server 5.0

  For more information on other improvements and bug fixes in Bitbucket Server & Data Center 5.0  and Bamboo 6.0 check out our Bitbucket and Bamboo release notes.