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.
- Open Bitbucket in your browser.
- Fork the
- Navigate to the Source tab of your new fork.
- Locate the
Readmefile and click it.
The source view appears:
- Click the Edit button.
The edit mode opens.
- Add a line to the file such as: Kilroy was here
- Click View diff to view the differences between your file and the latest on Bitbucket.
- Press Edit file to go back into edit mode.
- 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.
- Enter a commit message and press Commit.
Tips for using the online editor
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.
Was this helpful?
Thanks for your feedback!