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.

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.

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

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.

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!

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.

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.

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.

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.

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.

“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!