Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: How to split a PR #40916

Open
lithomas1 opened this issue Apr 13, 2021 · 1 comment
Open

DOC: How to split a PR #40916

lithomas1 opened this issue Apr 13, 2021 · 1 comment
Labels

Comments

@lithomas1
Copy link
Member

lithomas1 commented Apr 13, 2021

Location of the documentation

https://pandas.pydata.org/docs/dev/development/contributing.html#updating-your-pull-request

Documentation problem

It is somewhat common to send in a large pull request for review and have a maintainer ask to split a large pull request up into several precursor pull requests. However, the process of doing so can be somewhat tricky, so it should be mentioned in the contributing docs.

Suggested fix for documentation

Add to the contributing docs how to split up a PR.
Maybe use this as an example. (Am writing this from memory, might have errors)

git branch
# * feature-1
#    master
git checkout master
git checkout -b pre-cursor-to-feature-1
# on pre-cursor-to-feature-1 now
git checkout feature-1 /path/to/first/part/precursor/changes
git commit -m "Pre-cursor for feature-1
# After pre-cursor is merged(on branch feature-1 now)
git branch
# * feature-1
#    master
git pull upstream master
# If there are conflicts and you want to take the version in master.
git checkout --theirs path/to/files
@lithomas1 lithomas1 added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 13, 2021
@ivanovmg
Copy link
Member

Depending on the commits, you may want to suggest an interactive rebase, or simply reset --hard.

@mzeitlin11 mzeitlin11 removed the Needs Triage Issue that has not been reviewed by a pandas team member label Jul 10, 2021
@mzeitlin11 mzeitlin11 added this to the Contributions Welcome milestone Jul 10, 2021
@mroeschke mroeschke removed this from the Contributions Welcome milestone Oct 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants