From 0c456c07029fb49d17762df08557efc6402521ed Mon Sep 17 00:00:00 2001 From: Peter Kiraly Date: Fri, 31 Jan 2020 15:31:11 +0100 Subject: [PATCH 1/2] #6501 providing a Git command summary for preparing a pull request. --- .../source/developers/version-control.rst | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/doc/sphinx-guides/source/developers/version-control.rst b/doc/sphinx-guides/source/developers/version-control.rst index 618468392b7..ca6b235cccb 100644 --- a/doc/sphinx-guides/source/developers/version-control.rst +++ b/doc/sphinx-guides/source/developers/version-control.rst @@ -93,6 +93,65 @@ Now that you've made your pull request, your goal is to make sure it appears in Look at https://github.com/IQSS/dataverse/blob/master/CONTRIBUTING.md for various ways to reach out to developers who have enough access to the GitHub repo to move your issue and pull request to the "Code Review" column. +Summary of Git commands +~~~~~~~~~~~~~~~~~~~~~~~ + +There are two scenarios: + +* preparing the first request, when the IQSS Dataverse repository and the forked repository are identical +* creating an additional request after some time, when the IQSS Dataverse repository is ahead of the forked repository + +We use 123-COOL-FEATURE as the name of the feature branch, and https://github.com/YOUR_NAME/dataverse.git as your forked repository's URL, modify both accordingly. + +**1st scenario: preparing the first pull request** + +.. code-block:: bash + + # clone Dataverse at Github.com ... then + + git clone https://github.com/YOUR_NAME/dataverse.git dataverse_fork + cd dataverse_fork + + # create a new branch locally for the pull request + git checkout -b 123-COOL-FEATURE + + # working on the branch ... then commit changes + git commit -am "#123 explanation of changes" + + # upload the new branch to https://github.com/YOUR_NAME/dataverse + git push -u origin 123-COOL-FEATURE + + # ... then create pull request at github.com/YOUR_NAME/dataverse + + +**2nd scenario: preparing another pull request some month later** + +.. code-block:: bash + + # register IQSS Dataverse repo + git remote add upstream https://github.com/IQSS/dataverse.git + + git checkout develop + + # update local develop banch from https://github.com/IQSS/dataverse + git fetch upstream develop + git rebase upstream/develop + + # update remote develop branch at https://github.com/YOUR_NAME/dataverse + git push + + # create a new branch locally for the pull request + git checkout -b 123-COOL-FEATURE + + # work on the branch and commit changes + git commit -am "#123 explanation of changes" + + # upload the new branch to https://github.com/YOUR_NAME/dataverse + git push -u origin 123-COOL-FEATURE + + # ... then create pull request at github.com/YOUR_NAME/dataverse + + How to Resolve Conflicts in Your Pull Request --------------------------------------------- From 22eb7aa1c346c682bff6160a05c239bf5a923be7 Mon Sep 17 00:00:00 2001 From: Peter Kiraly Date: Fri, 31 Jan 2020 15:34:28 +0100 Subject: [PATCH 2/2] #6501 providing a Git command summary for preparing a pull request. --- doc/sphinx-guides/source/developers/version-control.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/sphinx-guides/source/developers/version-control.rst b/doc/sphinx-guides/source/developers/version-control.rst index ca6b235cccb..eaaf0fa1911 100644 --- a/doc/sphinx-guides/source/developers/version-control.rst +++ b/doc/sphinx-guides/source/developers/version-control.rst @@ -96,12 +96,12 @@ Look at https://github.com/IQSS/dataverse/blob/master/CONTRIBUTING.md for variou Summary of Git commands ~~~~~~~~~~~~~~~~~~~~~~~ -There are two scenarios: +This section provides sequences of Git commands for two scenarios: * preparing the first request, when the IQSS Dataverse repository and the forked repository are identical * creating an additional request after some time, when the IQSS Dataverse repository is ahead of the forked repository -We use 123-COOL-FEATURE as the name of the feature branch, and https://github.com/YOUR_NAME/dataverse.git as your forked repository's URL, modify both accordingly. +In the examples we use 123-COOL-FEATURE as the name of the feature branch, and https://github.com/YOUR_NAME/dataverse.git as your forked repository's URL. In practice modify both accordingly. **1st scenario: preparing the first pull request**