How Can I Merge Just The First Commit Of A Pull Request?
My Github repository has received a pull request consisting of several commits. I only want to accept the first of these. Is there any way I can do this without asking the PR author to change their PR?
The PR was sent a long time ago and I've been unable to reach the author. I realise that I could just create a new commit myself, but I'd prefer to have the original commit author's name on the commit.
I'd prefer to have the original commit author's name on the commit.
Nice and polite!
The first approach: create a commit and artificially assign it to a different author using
git commit --author=<author>. You can even change author's date to the date of the commit at GH:
The second approach is: fetch the PR from GH to a local branch and merge/cherry-pick one commit from the branch:
git fetch origin pull/$ID/head:pr-$ID # fetch the PR into branch pr-$ID git log pr-$ID # view commits and find the one git merge $COMMIT_ID
PS. Next time please use search.
- → Authenticate with a cookie using laravel 5.1 and jwt
- → Finding a specific GitLab tag from PHP
- → React: How to publish page on server using React-starter-kit
- → babel-loader, webpack, ES2015 modules: "Element type is invalid"
- → Create a function-attribute of a function, which is, in its turn, a method of an object literal
- → Model Validation in laravel 5.1 not working
- → GIT fatal: loose object
- → Laravel validation required rule not working
- → Axios array map callback
- → Where does this `webpack://` come from for `webpack-dev-middleware`?
- → error when trying to modify project in laravel forge
- → GitHub Pages and Jekyll content duplication and SEO issues
- → Use Laravel repositories with Datatables