Skip to content

Latest commit

 

History

History
66 lines (57 loc) · 2.46 KB

PRs.md

File metadata and controls

66 lines (57 loc) · 2.46 KB

What to do with existing GitHub PRs?

A pull request is a bunch of commits forking for some other commit. As such, the same commits should be applicable to the forked repository (Solr or Lucene), at least initially (until the folder structure changes, for example).

Here is a sample workflow to apply an existing pull request from Lucene:

apache#2459

  1. You can just apply this PR directly as a patch:
git clone https://github.com/apache/lucene.git
cd lucene
wget https://github.com/apache/lucene-solr/pull/2459.patch
git apply 2459.patch
git add -A .
git commit -m "Applying PR # ..."
git push
  1. You can "rebase" the PR via a separate fork on github. This preserves commit history but is slightly longer. Example:
# clone your own fork
git clone https://github.com/dweiss/lucene.git
cd lucene
# add pr's repository as the remote and fetch commits from there
git remote add donnerpeter https://github.com/donnerpeter/lucene-solr.git
git fetch donnerpeter
# get the PR's branch:
git checkout donnerpeter/revTrie -b revTrie
# push to your own fork
git push origin HEAD -u
# The above will display a PR-creating link but you can also do this manually:
https://github.com/apache/lucene/compare/main...dweiss:revTrie
Look at the PR and create it if it looks good.
# This example's PR was at:
https://github.com/apache/lucene/pull/2