# Pulling a git PR into my local repository

**URL:** https://forum.mautic.org/t/pulling-a-git-pr-into-my-local-repository/9262
**Category:** Product Support
**Created:** [August 19, 2017, 6:46am UTC](https://forum.mautic.org/t/pulling-a-git-pr-into-my-local-repository/9262 "2017-08-19T06:46:40Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![andrass](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrass/32/524_2.png) [@andrass](https://forum.mautic.org/u/andrass)
#### Post date: [August 19, 2017, 6:46am UTC](https://forum.mautic.org/t/pulling-a-git-pr-into-my-local-repository/9262/1 "2017-08-19T06:46:40Z")

</div>

Quote:

Testing a PR is a great way to move Mautic forward and personally improve its quality and stability.

- that is what is written on the Mautic github - not so easy for me.  
  
I have forked Mautic on github, then cloned the repository locally onto my Win10 box.  
  
Now I want to pull some PRs into my repository for testing. John pointed me to https://github.com/mautic/mautic#how-to-test-a-pull-request but I am stuck. This is what I get:  

Code:

$ git branch -a bounce-recognition \* staging remotes/origin/HEAD -\> origin/staging remotes/origin/bounce-recognition remotes/origin/bugfix-http-code-500-error remotes/origin/bugfix-unstable-session-name remotes/origin/master remotes/origin/release-2.9.1 remotes/origin/staging remotes/upstream/bugfix-http-code-500-error remotes/upstream/bugfix-unstable-session-name remotes/upstream/front-end\_web-notifications\_label remotes/upstream/help\_popups remotes/upstream/master remotes/upstream/release-2.9.1 remotes/upstream/staging

$ git checkout staging  
Switched to branch ‘staging’  
Your branch is up-to-date with ‘origin/staging’.

$ git fetch origin pull/4674/head:staging  
fatal: Couldn’t find remote ref pull/4674/head

  
How do I get a PR into my own repository? I hope I don't need to clone mautic/mautic or escopecz/mautic for this, do I ?

---

<div class="post-metadata">

### Author: ![andrass](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrass/32/524_2.png) [@andrass](https://forum.mautic.org/u/andrass)
#### Post date: [August 19, 2017, 6:46am UTC](https://forum.mautic.org/t/pulling-a-git-pr-into-my-local-repository/9262/2 "2017-08-19T06:46:40Z")

</div>

[quote]Testing a PR is a great way to move Mautic forward and personally improve its quality and stability.[/quote] - that is what is written on the Mautic github - not so easy for me.

I have forked Mautic on github, then cloned the repository locally onto my Win10 box.

Now I want to pull some PRs into my repository for testing. John pointed me to [https://github.com/mautic/mautic#how-to-test-a-pull-request](https://github.com/mautic/mautic#how-to-test-a-pull-request) but I am stuck. This is what I get:

[code]$ git branch -a  
bounce-recognition

- staging  
remotes/origin/HEAD -\> origin/staging  
remotes/origin/bounce-recognition  
remotes/origin/bugfix-http-code-500-error  
remotes/origin/bugfix-unstable-session-name  
remotes/origin/master  
remotes/origin/release-2.9.1  
remotes/origin/staging  
remotes/upstream/bugfix-http-code-500-error  
remotes/upstream/bugfix-unstable-session-name  
remotes/upstream/front-end\_web-notifications\_label  
remotes/upstream/help\_popups  
remotes/upstream/master  
remotes/upstream/release-2.9.1  
remotes/upstream/staging

$ git checkout staging  
Switched to branch ‘staging’  
Your branch is up-to-date with ‘origin/staging’.

$ git fetch origin pull/4674/head:staging  
fatal: Couldn’t find remote ref pull/4674/head[/code]

How do I get a PR into my own repository? I hope I don’t need to clone mautic/mautic or escopecz/mautic for this, do I ?

---

<div class="post-metadata">

### Author: ![kgroves](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/kgroves/32/560_2.png) [@kgroves](https://forum.mautic.org/u/kgroves)
#### Post date: [August 21, 2017, 1:11pm UTC](https://forum.mautic.org/t/pulling-a-git-pr-into-my-local-repository/9262/3 "2017-08-21T13:11:59Z")

</div>

Awesome for having a go. I did create a Vagrant config for auto pull and build for PR testing:

[https://github.com/kgroveshok/mauticpr](https://github.com/kgroveshok/mauticpr)

---

<div class="post-metadata">

### Author: ![andrass](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/andrass/32/524_2.png) [@andrass](https://forum.mautic.org/u/andrass)
#### Post date: [August 22, 2017, 6:06pm UTC](https://forum.mautic.org/t/pulling-a-git-pr-into-my-local-repository/9262/4 "2017-08-22T18:06:05Z")

</div>

Brilliant ! I hope this gets a lot of people on the testing boat. I always see people complaining that this-or-that is broken, but always after the release. Me not understand why not test before. Me maybe too simple.

Fwiw, I want to be able to test and give feedback before releases, but I also want to incorporate PR of bug-fixes into my own environment without waiting for the next (stable) release.

At this point, we are at 2.9.2, and 2.10.0 is the next foreseeable release. However, I do know that I won’t install 2.10.0, but wait at least until 2.10.2. Still I see the fixes for bugs in 2.9.2, and I want them without having to wait for the new bugs (and exciting new features, of course).

I have no intention (or time, or brains) to become a git-master, and my Google-fu fails on me. So I do diff’s and patch’s to get me there. No problem, but feeding back into the development is probably getting harder that way.

@kgroves : Hope your Vagrant flies!

---

<div class="post-metadata">

### Author: ![kgroves](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/kgroves/32/560_2.png) [@kgroves](https://forum.mautic.org/u/kgroves)
#### Post date: [August 23, 2017, 9:10am UTC](https://forum.mautic.org/t/pulling-a-git-pr-into-my-local-repository/9262/5 "2017-08-23T09:10:25Z")

</div>

Thats sort of the reason i made it. I needed a quick way to pull in a PR and/or full release, test and the decide if go live. Hope it helps others.
