💾 Archived View for zigford.org › trying-out-a-pull-request.gmi captured on 2024-02-05 at 09:37:13. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-03-20)
-=-=-=-=-=-=-
Sharing linux/windows scripts and tips
October 06, 2019 — Jesse Harris
You've received a pull request on your repo. Before merging you want to see what it looks like in your code base. Perhaps you will run some manual test or some diffs from the command line here and there.
~~~
You can find this information anywhere out there on the web. As always the purpose of this blog is more of a notetaking for me, but the other angle I want to cover is not the exact commands to type (That will be here too), but why you are typing them.
You want to start off with a clean local repository. That might mean running a git pull, a git clone or switching to the master branch using git
checkout.
I'm checking out a PR for my snapd ebuild repo
You will need to know the GitHub authors account name and the branch that they are making changes from.
From here it's easy. Conceptually, we are checking out a local branch to pull the changes into
# localbranchname is a new branch where we will pull # the PR. It can be named whatever # master is the branch we want the new branch to be # based off git checkout -b <localbranchname> master git pull <githubAddressToUsersFork>.git <branchTheyCommitedTo>
Perhaps your happy with the change. Your very close to being able to merge the PR to your master repo. Here is how you would do that.
```
git checkout master
git merge <localbranchname>
git push origin master
```
Tags:
Generated with bashblog, a single bash script to easily create blogs like this one