In all cases, clean up after myself if process failed.
Possible errors
From create-branch endpoint
422 Unprocessable Entity
"message": "Reference already exists",
"documentation_url": "https://developer.github.com/v3/git/refs/#create-a-reference"
From get-master endpoint
404 Not Found: Master branch does not exist
When creating new file via the content endpoint
InvalidCharacterError
thrown by window.btoa() when users enters non-ASCII character in any field.