-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: update contributing guide regarding updating a pull request (merge master) #19990
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: update contributing guide regarding updating a pull request (merge master) #19990
Conversation
Codecov Report
@@ Coverage Diff @@
## master #19990 +/- ##
=========================================
Coverage ? 91.71%
=========================================
Files ? 150
Lines ? 49112
Branches ? 0
=========================================
Hits ? 45045
Misses ? 4067
Partials ? 0
Continue to review full report at Codecov.
|
Looks great. Is it any reason to not use the |
@datapythonista actually should check out tracking branches in the first place, e.g.
is usually the correct thing to do |
Yes, the only problem is then that those commands won't work if you didn't do that in the first place. So I am certainly in favor of mentioning this when creating the branch (as @jreback points out) or when doing the first push. But maybe we can still keep the general working method here? (although it being more verbose) (I personally have just my general setting of git to push to same-named branches, so I never do |
@jschendel did you delete your comment? I think it was relevant:
You could say that as long as this is before submitting the PR this is fine, but then it can be confusing that we give different guidelines on how to update a branch before and after you submitted a PR ? |
Yeah, I deleted my comment since I missed part of the mailing list discussion thread, and finding it cleared up some of my confusion. I'm +1 on removing the |
@jschendel @jreback @TomAugspurger or any body else -> Question: how do you typically update your master branch with upstream/master? (before creating a new feature branch) Because that is currently not really mentioned in the contributing guide (it only mentions how to update a branch with rebase, which I will change to merge). I have an git alias that does:
I have the What do others do for this step? Or what would be the best to recommend in the contributing guide? |
i have a local tracking branch: master that tracks upstream/master so does it all for me |
Yes in that case (and |
I only had basic git skills when I started contributing to pandas, so I just followed the contributing guide, probably too closely, and was using the previously recommended
Definitely overkill though, as I never actually make changes on master. |
Yes, and therefore also the wrong recommendation I think, as if you made changes by accident to master, it will not do what you want (it should complain instead IMO). |
Yes, didn't mean for that to sound like I was suggesting the rebase approach that was previously in the docs; was also trying to say that my approach is not the right one here. The fast-forward approach seems like the most appropriate one to me. |
Yes, I didn't interpret it like that! You nicely followed are guidelines :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. very minor comments.
default commit message will open, and you can simply save and quit this file. | ||
|
||
If there are merge conflicts, you need to solve those conflicts. See for | ||
example at https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to make this an http ref
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sphinx does that automatically
doc/source/contributing.rst
Outdated
added, you can run ``git commit`` to save those fixes. | ||
|
||
If you have uncommitted changes at the moment you want to update the branch with | ||
master, you will need to ``stash`` them prior to updating. This will effectively |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add a reference to git stash here (git docs)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
doc/source/contributing.rst
Outdated
store your changes and they can be reapplied after updating. | ||
|
||
After the feature branch has been update locally, you can now update your pull | ||
request by pushing to the branch on GitHub:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add a comment about -f
force option of push (they shouldn't use it)
Any more comment? |
Closes #19412
Reference discussion: https://mail.python.org/pipermail/pandas-dev/2017-November/000632.html
cc @datapythonista