Revisions
-
Potherca revised this gist
May 3, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ Just follow these steps: 4. Do a POST request from Hurl to `https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs` with the following as the POST body : { "ref": "refs/heads/<NEW-BRANCH-NAME>", "sha": "<HASH-TO-BRANCH-FROM>" } -
Potherca revised this gist
May 3, 2013 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,16 +5,16 @@ With the aid of [the Github API][1] and [hurl.it][2] this is a piece of cake! Just follow these steps: 1. Open [http://hurl.it/][2] 2. Find the revision you want to branch from. Either on Github itself or by doing a GET request from Hurl: `https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs/heads` 3. Copy the revision hash 4. Do a POST request from Hurl to `https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs` with the following as the POST body : { "ref": "refs/heads/\NEW-BRANCH-NAME>", "sha": "<HASH-TO-BRANCH-FROM>" } (obviously replacing the `<NEW-BRANCH-NAME>` with the name your want the new branch to have and the `<HASH-TO-BRANCH-FROM>` with, you know, the hash of the revision you want to branch from) You will need to use HTTP basic and fill in your Github credentials to access the Github API. -
Potherca revised this gist
May 3, 2013 . 1 changed file with 7 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,8 +10,8 @@ Just follow these steps: 4. Do a POST request from Hurl to https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs with the following as the POST body : { "ref": "refs/heads/\NEW-BRANCH-NAME>", "sha": "<HASH-TO-BRANCH-FROM>" } (obviously replacing the <NEW-BRANCH-NAME> with the name your want the new branch to have and the <HASH-TO-BRANCH-FROM> with, you know, the hash of the revision you want to branch from) @@ -26,5 +26,10 @@ The situation I ran into, was that I found a web app that had a demo but the dem I've also used this to submit (simple) fixes to repos that require a pull-request from a branch that is not master. Do you have any other use cases or maybe any other service than Hurl that could be used? Let me know in the comments! [1]: http://developer.github.com/v3/ [2]: http://hurl.it/ -
Potherca revised this gist
May 3, 2013 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,14 +9,14 @@ Just follow these steps: 3. Copy the revision hash 4. Do a POST request from Hurl to https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs with the following as the POST body : { "ref": "refs/heads/\<NEW-BRANCH-NAME\>", "sha": "\<HASH-TO-BRANCH-FROM\>" } (obviously replacing the <NEW-BRANCH-NAME> with the name your want the new branch to have and the <HASH-TO-BRANCH-FROM> with, you know, the hash of the revision you want to branch from) You will need to use HTTP basic and fill in your Github credentials to access the Github API. 5. Press the Send button and your branch will be created! -
Potherca revised this gist
May 3, 2013 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,17 +8,17 @@ Just follow these steps: 2. Find the revision you want to branch from. Either on Github itself or by doing a GET request from Hurl: https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs/heads 3. Copy the revision hash 4. Do a POST request from Hurl to https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs with the following as the POST body : { "ref": "refs/heads/\<NEW-BRANCH-NAME\>", "sha": "\<HASH-TO-BRANCH-FROM\>" } (obviously replacing the <NEW-BRANCH-NAME> with the name your want the new branch to have and the <HASH-TO-BRANCH-FROM> with, you know, the hash of the revision you want to branch from) You will need to use HTTP basic and fill in your Github credentials to access the Github API. 5. Press the Send button and your branch will be created! --- -
Potherca revised this gist
May 3, 2013 . 1 changed file with 26 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,30 @@ Ever had the need to create a branch in a repo on Github without wanting (or being able) to access a local repo? With the aid of [the Github API][1] and [hurl.it][2] this is a piece of cake! Just follow these steps: 1. Open [http://hurl.it/][2] 2. Find the revision you want to branch from. Either on Github itself or by doing a GET request from Hurl: https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs/heads 3. Copy the revision hash 4. Do a POST request from Hurl to https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs with the following as the POST body : { "ref": "refs/heads/<NEW-BRANCH-NAME>", "sha": "<HASH-TO-BRANCH-FROM>" } (obviously replacing the <NEW-BRANCH-NAME> with the name your want the new branch to have and the <HASH-TO-BRANCH-FROM> with, you know, the hash of the revision you want to branch from) You will need to use HTTP basic and fill in your Github credentials to access the Github API. Press the Send button and your branch will be created! --- The situation I ran into, was that I found a web app that had a demo but the demo wasn't hosted anywhere. So all I needed to do was clone the repo, create a branches called `gh-pages` (which automatically creates a site hosted by github) and I could watch the demo online without any local repo. I've also used this to submit (simple) fixes to repos that require a pull-request from a branch that is not master. [1]: http://developer.github.com/v3/ [2]: http://hurl.it/ -
Potherca renamed this gist
Jan 14, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Potherca revised this gist
Oct 27, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,6 +10,6 @@ create a branch on github without having access to a local git repo. POST BODY : { "ref": "refs/heads/new-branch-name", "sha": "<SHA-TO-BRANCH-FROM>" } -
Potherca revised this gist
Oct 27, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ On http://hurl.it/ using HTTP basic AUTH and the inputs below you can create a branch on github without having access to a local git repo. (With "`<SHA-TO-BRANCH-FROM>`" being one of the latest commit in the repo, as shown by `https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs/heads`). === -
Potherca revised this gist
Oct 27, 2012 . 1 changed file with 9 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,15 @@ On http://hurl.it/ using HTTP basic AUTH and the inputs below you can create a branch on github without having access to a local git repo. (With "`<SHA-TO-BRANCH-FROM>`" being one of the latest commit in the repo, as shown by https://api.github.com/repos/`<AUTHOR>`/`<REPO>`/git/refs/heads). === URL : https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs POST BODY : { "ref": "refs/heads/test", "sha": "<SHA-TO-BRANCH-FROM>" } -
Potherca renamed this gist
Oct 27, 2012 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,3 @@ On http://hurl.it/ using HTTP basic AUTH and the inputs below you can create a branch on github without having access to a local git repo. -
Potherca created this gist
Oct 27, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ On http://hurl.it/ using HTTP basic AUTH and the inputs below you can create a branch on github without having access to a local git repo. (With "<SHA-TO-BRANCH-FROM>" being one of the latest commit in the repo, as shown by https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs/heads). === URL : https://api.github.com/repos/<AUTHOR>/<REPO>/git/refs POST BODY : { "ref": "refs/heads/test", "sha": "<SHA-TO-BRANCH-FROM>" }