You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by Dhruv Mahajan <dh...@gmail.com> on 2016/04/14 03:25:26 UTC
A git question
Hi
I have a following weird situation. I nuked my origin and created another
one. But then the pull request associated with it with branch REEF-1224:
https://github.com/apache/reef/pull/939/ now shows unknown repository as
source and rightly so. Now when I push REEF-1224 back and will try to
create new pull request ofcourse it will not map to above pull request url
or id. Is there a way to do this remapping or not? Otherwise it will be
inconvenient for current reviewers.
Dhruv
Re: A git question
Posted by Markus Weimer <ma...@weimo.de>.
On 4/14/2016 11:54 AM, Dhruv Mahajan wrote:
> No :( ... The remote branches have all been deleted...whats remaining is a
> pull request.
Oh wow. You also nuked your remote? That is a thorough clean :)
You can checkout an individual pull request via
```
$> git fetch https://github.com/apache/reef pull/$PR/head:$branch
```
replace $PR with the numerical ID of the pull request and $branch with
the name of the branch you want to create locally. Alternatively, you
can add the following code to your PowerShell profile:
```
function REEF-Checkout-PullRequest{
param
(
[Parameter(Position=0, Mandatory=$true, HelpMessage='The pull
request numer')]
[int]$PR,
[Parameter(Mandatory=$false, HelpMessage='The branch to check
the PR out into')]
[string]$B
)
$branch = if([string]::IsNullOrEmpty($B)) {"PR-$PR"} else {$B}
Invoke-Expression "git fetch https://github.com/apache/reef
pull/$PR/head:$branch"
Invoke-Expression "git checkout $branch"
}
```
Markus
Re: A git question
Posted by Dhruv Mahajan <dh...@gmail.com>.
No :( ... The remote branches have all been deleted...whats remaining is a
pull request.
Dhruv
On Thu, Apr 14, 2016 at 11:05 AM, Markus Weimer <ma...@weimo.de> wrote:
> Hi,
>
> I believe what you want to do is make your local branch track a new
> upstream. With those words in the query, the internet knows an answer :)
>
> http://bfy.tw/5GsJ
>
> Markus
>
Re: A git question
Posted by Markus Weimer <ma...@weimo.de>.
Hi,
I believe what you want to do is make your local branch track a new
upstream. With those words in the query, the internet knows an answer :)
http://bfy.tw/5GsJ
Markus