Edit your code in the cloud with Bitbucket

By on May 14, 2013

Have you ever wanted to make a quick change to a file in a repository without having to clone it locally? You want to edit your code where it lives. Introducing the Bitbucket online editor: edit your code directly with Bitbucket – no command line, no cloning, no local editor.


Edit any file, anywhere

From Bitbucket, you can edit any file, anywhere, all you need is your browser. Once you’re happy with your edits, you can commit straight away or create a pull request to contribute your changes.

Edit button from Source

Once you select Edit from the source browser, Bitbucket activates the editor and away you go. Syntax highlighting and diff view are all an integrated part of the code editing experience.

Bitbucket editor

The editor is intelligent enough to determine the indentation style from the file’s original contents. If it’s off the mark, you can manually set your preferred indent mode and tab size.


The workflow is flexible for every team’s process – commit directly to the branch you’re editing on, or create a pull request and select your reviewers. If you don’t have write access, Bitbucket will automatically create a fork for you and commit your changes before submitting a pull request.

Quickly react to pull request feedback

Editor from pull requests

If your team is like ours, you’re using pull requests for code review. Often times, you have changes you need to make based on feedback from your teammates before your code is merged. Editing online shouldn’t get in your way. The Bitbucket online editor allows you to edit your open pull requests directly. We’ll even update your pull request for you once you’ve committed your changes.

Built with CodeMirror

At the core of the Bitbucket online editor is CodeMirror – an excellent open-source JavaScript code editor component. The project’s terrific extension API as well as its top-notch documentation made implementation nearly painless. In addition, the friendly MIT license, the editor’s blazing-fast performance, and the project’s support for a wide number of languages made the choice of CodeMirror an easy one.

  • http://twitter.com/synapticarbors Joshua Adelman

    It would be great to have the ability to select vim or emacs key bindings since CodeMirror already supports both.

    • Jon Mooring

      Yep, definitely something we’ve considered. We have an open issue in our backlog. Thanks for the suggestion!

      • http://jaimegildesagredo.github.com/ Jaime Gil de Sagredo

        Vim keybindings would be really awesome.

        Great work!

  • Matthew Turk

    This is really awesome! Thanks for adding this. One quick question — with hg it looks like this uses named branches by default. Any chance of that getting changed to something less permanent / namespacey, like bookmarks or anonymous heads? Thank you!

    • Jon Mooring

      Not something we considered, but definitely a good idea. I’ll add a ticket to our internal issue tracker. Thanks for the suggestion!

      • Matthew Turk

        Thanks, Jon! We’ll probably start using this right away in our project for quick fixes that don’t need pull requests — it’s a really awesome feature to have. If there’s a place I can “watch” the issue about potentially having anonymous heads / bookmarks, I’d love to hear about updates so we can roll this out for code reviewable changes.

  • http://tshepang.net/ Tshepang Lekhonkhobe

    Now only one issue needing a fix before I’m super happy: https://bitbucket.org/site/master/issue/2184.

    • Kenneth Endfinger

      +1 for a fix for that. Been wanting that so much!

  • http://twitter.com/b56girard BenWa


  • http://www.facebook.com/terrence.a.davis1 Terrence Andrew Davis

    God says…
    visit those that be cut off, neither shall seek the young one, nor
    heal that that is broken, nor feed that that standeth still: but he
    shall eat the flesh of the fat, and tear their claws in pieces.
    11:17 Woe to the idol shepherd that leaveth the flock! the sword shall
    be upon his arm, and upon his right eye: his arm shall be clean dried
    up, and his right eye shall be utterly darkened.

    • http://twitter.com/erikvanzijst Erik van Zijst


  • http://www.facebook.com/daniel.honig Daniel Honig

    +1 for vim bindings

  • Anonymous

    need a vi like editor, vian or jsvi are ok

    and i guess the next step is to let user developing online or deploy it online?

  • http://twitter.com/altuure altuure

    great feature…

  • xr09

    +1 vim keybindings

  • Anonymous

    Are you going to add the ability to create a file on the fly?

    • http://www.bitbucket.org Justen Stepka

      In a future iteration we’ll add this.

      • Anonymous


      • Alex

        Cool, thanks 🙂

  • http://twitter.com/ideasatrandom Ideas At Random …


  • pavan bangaram

    This is really awesome! Thanks for adding this post. Great post..!

  • James Zhang

    Add the ability to create a file in folder on the fly please!!!

  • Kuitsi

    Commits are not visible in Dashboard and repository’s Recent Activity.

    • http://tshepang.net/ Tshepang Lekhonkhobe

      Nice catch there, if you are referring to commits done via the online editor.

    • Jonathan Mooring

      We had some weirdness with our post-commit background tasks yesterday. Are you still seeing this?

      Another thing to note is that if you choose to create a pull request for your change, we’ll collapse the commit activity with the pull request creation activity.

  • Paul Chen


  • Diego Alonso

    Ability to share an editing session for remote pair programming would be awesome!

  • Dan Brown

    This is awesome, Now I can edit code on my chrome book and then pull it down later into android studio. Thank you very much!!!

    • Kenneth Endfinger

      Cool, a Chromebook user 🙂 dev-mode on?

  • Tamás Herman

    Include collaborative editing, like http://coderpad.io/ then you will be the ultimate web app prototyping platform pretty quick

    I wish http://darcs.net/ would have such a nice hosting service as BitBucket…

  • Anonymous

    Finally! Thank you SO much.

  • http://twitter.com/snadahalli Sandeepa Nadahalli

    This is really useful!

  • http://sector-seven.net DannyB

    BitBucket, you guys are very much awesome. This is a very nice addition and very well implemented. I love your service so much, I am always looking for more projects to code, so I can push them to your repos… seriously.

  • http://twitter.com/mooij Andries Mooij

    This is really cool! I love the feature.

  • http://erickmendonca.com.br/ Erick Mendonça


  • David

    It would be great to hav..

  • Javier Tapia

    Fine! A long awaited feature.

  • http://iamkenju254.wordpress.com/ Kenneth Kinyanjui

    Awesome feature.

  • Mark7614

    Great idea, but doesn’t seem to work with iPad. No keyboard appears when I position the cursor for editing.

  • Vishant

    Does it support ruby on rail code edits

  • Thomas Thomassen

    This feature is great. I just used it on a pull request I had to make some minor tweaks in order to make the code conform with the project coding style. Incredible easy to just do that directly in the Pull Request instead of manually pulling etc.

  • Anonymous

    Nice … for that moment when you are somewhere in the wild and suddenly the solutions strike your head. Cool

  • frif

    It would be nice to be able to test that the code works before committing the edits. Something like having the changes available as a Dropbox share would allow me to do that, by having that share mounted on my development server I could test the changes.

  • kulak

    It would be great if it will be possible to create a new file and edit it from Bitbucket 🙂

  • stringerbell

    Super cool! It seems like editing code directly and saving on bitbucket doesn’t trigger a POST request like it does when pushing to it. Any chance of adding this?

  • Anonymous

    This is better than slice bread! yay

  • Hayk Saakian

    What about opening up the api for this? Maybe I want to make automatic small changes llike updating rails if there’s a new vulnerability found.

  • pm

    Awesome and very useful, thanks !

  • CodeMirrorer

    My team ♥’s CodeMirror! You can download the code or fork it on GitHub via https://github.com/marijnh/CodeMirror.

  • weager

    That‘s great.

  • richard
  • Tricae

    If one could search for code online, we could fix it also.
    So no we make a local clone, search for code in our IDE and then change the code online :))

  • Preetham

    I always get this error message when I try to commit using ur online editor. I have tried a lot of times. “We had trouble committing your changes.”

  • Krunkadunk

    “no command line, no cloning, no local editor” “all you need is your browser” – okay! I signed up, created a repo in Bitbucket, and now it tells me to create a local git repo and make a commit. Um… with no command line… because all I need is my browser, right? I had to create an empty repo on github and import it to get started, and now it appears that I can’t add a file online. So… I can edit in the cloud, but I can’t create? Pathetic!

  • Pingback: フェッチ機能を活用してプルリクエストに習熟しよう | Atlassian Japan()

  • diegotsu

    Is it possible to edit more than 1 file and put it together into one single commit?

  • Pingback: Gazing into the CodeMirror | TRIFORCE STUDIO()