Edit online

You can use the online editor to change your files from within the Bitbucket Cloud GUI. The editor relies on your repository permissions.  Users with write access can edit and commit changes immediately.  Users with read acces can edit in place but committing a change causes Bitbucket to:

  • fork the repository
  • commit the change
  • make a pull request back to the original repository

You can edit a file from the Source view or from within a pull request. When editing within a pull request, you need write access on the source repository.  

Try using the online editor

This example creates a fork of the tutorials.bitbucket.org repository but you could try it on ay repo you have write access to.

  1. From the tutorials/tutorials.bitbucket.org repository, click + in the global sidebar and select Fork this repository under Get to work.
  2. Click the Fork repository button.
  3. Click the Source tab of your new fork.
  4. Locate the Readme file and click it.
    The source view appears:
  5. Click the Edit button.
    The edit mode opens.
  6. Add a line to the file such as: Kilroy was here
  7. Click View diff to view the differences between your file and the latest on Bitbucket.
  8. Press Edit file to go back into edit mode.
  9. Press Save.
    The Save changes dialog appears.  Users with write acces to the repository can commit directly to the repository or can set Create a pull request for this change.  If you don't have write access, Bitbucket automatically creates a pull request for you. 
  10. Enter a commit message and press Commit.

Tips for using the online editor

Behind the editor is the CodeMirror Javascript component.  So, if you are editing a file in one of the Codemirror supported modes, your file appears with the proper syntax highlighting. For example, the following markdown file:

When editing a file in a Pull Request you can navigate to the previous and next change. 

The editor also attempts to guess whether the file you are editing uses Tabs or Spaces when indenting. If it guesses wrong, you can change the indentation using the dropdown menu. Finally, if you are editing a long file from within a pull request, you can use the  << (Previous) and >> (Next) buttons to travel between line-level differences.

Last modified on Aug 31, 2017

この翻訳に満足しましたか?

はい
いいえ
この記事についてのフィードバックを送信する

Not finding the help you need?

コミュニティへの質問

Powered by Confluence and Scroll Viewport.