From 3d985201072fcea3072d0d8dcc5e62d25993449f Mon Sep 17 00:00:00 2001 From: Keewis Date: Wed, 19 Aug 2020 20:08:20 +0200 Subject: [PATCH 1/3] use merge instead of rebase --- doc/contributing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/contributing.rst b/doc/contributing.rst index 975f4e67ba2..c9090174278 100644 --- a/doc/contributing.rst +++ b/doc/contributing.rst @@ -206,9 +206,9 @@ and switch in between them using the ``git checkout`` command. To update this branch, you need to retrieve the changes from the master branch:: git fetch upstream - git rebase upstream/master + git merge upstream/master -This will replay your commits on top of the latest *xarray* git master. If this +This will combine your commits with the latest *xarray* git master. If this leads to merge conflicts, you must resolve these before submitting your pull request. If you have uncommitted changes, you will need to ``git stash`` them prior to updating. This will effectively store your changes and they can be From ddec2e7034caa38a59ddb46cf389a712c0bb904b Mon Sep 17 00:00:00 2001 From: Keewis Date: Wed, 19 Aug 2020 20:22:41 +0200 Subject: [PATCH 2/3] update the delete-after-merge branch --- doc/contributing.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/doc/contributing.rst b/doc/contributing.rst index c9090174278..34584b117f8 100644 --- a/doc/contributing.rst +++ b/doc/contributing.rst @@ -824,8 +824,7 @@ Delete your merged branch (optional) ------------------------------------ Once your feature branch is accepted into upstream, you'll probably want to get rid of -the branch. First, merge upstream master into your branch so git knows it is safe to -delete your branch:: +the branch. First, update your ``master`` branch to check that the merge was successful:: git fetch upstream git checkout master @@ -833,12 +832,14 @@ delete your branch:: Then you can do:: - git branch -d shiny-new-feature + git branch -D shiny-new-feature -Make sure you use a lower-case ``-d``, or else git won't warn you if your feature -branch has not actually been merged. +You need to use a upper-case ``-D`` because the branch was squashed into a +single commit before merging. Be careful with this because ``git`` won't warn +you if you accidentally delete a unmerged branch. -The branch will still exist on GitHub, so to delete it there do:: +If you didn't delete it using GitHub's interface, the branch will still exist on +GitHub. To delete it there do:: git push origin --delete shiny-new-feature From e5c97b3cb7de7f0df812c3161dd8e0b0c6fc283e Mon Sep 17 00:00:00 2001 From: Keewis Date: Wed, 19 Aug 2020 20:26:39 +0200 Subject: [PATCH 3/3] update whats-new.rst --- doc/whats-new.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/whats-new.rst b/doc/whats-new.rst index 2652af5d9fd..f45e5837867 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -75,6 +75,8 @@ Documentation By `Sander van Rijn `_. - removed skipna argument from :py:meth:`DataArray.count`, :py:meth:`DataArray.any`, :py:meth:`DataArray.all`. (:issue:`755`) By `Sander van Rijn `_ +- update the contributing guide to use merges instead of rebasing and state + that we squash-merge. (:pull:`4355`) By `Justus Magin `_. Internal Changes ~~~~~~~~~~~~~~~~