I am new to using GitHub. I have downloaded the master, but how to do I merge pull requests into it to test features that are still undergoing review. I understand this may make things unplayable or break things, but I’d like to help with testing new code if possible.
- Install git and clone with
git clone --recursive https://github.com/citra-emu/citra.git.
- Add remote repo with
git remote add username https://github.com/username/citra.git.
- Pull with
git pull username.
- Merge with
git merge username/branch.
So it should look something like this if I wanted to pull a PR from lets say FernandoS27
git pull FernandoS27
git merge FenrnadoS27/branch
I’m just not sure what the branch is.
Plus when I run the command Git pull I get this
You asked to pull from the remote ‘FernandoS27’, but did not specify
a branch. Because this is not the default configured remote
for your current branch, you must specify a branch on the command line.
It like my second or third time with this and I usually only used it myself and not with others.
This is an example of a branch:
So you add the remote repo with
git remote add https://github.com/FenrnadoS27/citra.git, pull it with
git pull FenrnadoS27then merge the branch you want with
git merge FenrnadoS27/tangent-spacefor example.
Thanks for your reply. I tried that. And it asked me to leave a note as to why the merge was necessary and I couldn’t get it to work after that. I’m using both GitBash and GitHub Desktop and not having much luck with either. I did get through your instructions okay though.
You don’t really have to type anything. Just press Esc key.
It doesn’t go away when I press Esc. It just stays there. It looks like something is happening, but I don’t see anything.
Please post a screenshot.
I was able to fix it. Shift+zz worked for me.
Merging is not necessary if you are just going to test one PR AND the PR is based on a recent master. You can just
git checkout the PR branch and compile it.
Also, github provides an alternative interface to fetch PR. You can do
git fetch origin pull/<PR number here>/head:<An arbitrary branch name> (
origin represents the main citra repo. It might be
upstream depending on your configuration)
git checkout <The branch name you just specified>
I tried the git fetch function, but I keep getting an error.
fatal: Couldn’t find remote ref pull/2451/FernandoS27
I’m not sure what it is I’m doing wrong.
git fetch origin pull/<PR number here>/head:<An arbitrary branch name> ^ Just type the word "head" here. Don't replace it with the author name
Gotcha. Good to know for in the future. Thank you.