Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to edit file and commit github/bitbucket from browser

I want to use editor in browser and save in github without server. Just like text editor in github/bitbucket could new file and save it

I want to know are there any REST api of this 2 services to easily commit file like that

Or a git library in js that could work without the need to pull all files in to our machine

edit:

After 2018 both service already expose their API. This question is outdated

like image 406
Thaina Yu Avatar asked Apr 28 '16 09:04

Thaina Yu


1 Answers

In case you're looking for an online code editor that you can connect to github or bitbucket then you could take a look at these:

  • Codeanywhere
  • Cloud9

If you're looking to develop such an editor yourself, you could just start from github or bitbucket's REST API documentation:

  • Github
  • Bitbucket

And just choose the javascript REST library of your preference to interact with those APIs.

For Github: to create/update/remove files you can use the Contents resources.

For example, this section explains how to update a file.

like image 99
GlennV Avatar answered Sep 24 '22 20:09

GlennV