From e2508ecdf5336b6fc3e120cfe15c1a46c437ca02 Mon Sep 17 00:00:00 2001 From: Julia Kent <46687291+jukent@users.noreply.github.com> Date: Wed, 16 Aug 2023 10:18:15 -0600 Subject: [PATCH 1/2] Create CONTRIBUTING.md --- CONTRIBUTING.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..4fb7b2a1b --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,65 @@ +# ESDS Blog Contributors Guide + +> **Note**: Steps 1-5 are only necessary the first time; once you have forked and cloned the repo you can start at step 6 to create new branches for new contributions + +1. From web, fork the ESDS repo + * “Fork” button in upper right + +2. From terminal, navigate to where you’d like to clone the repo + +3. Clone your fork +``` +git clone git@github.com:$USER/esds.git +``` + +5. Navigate to cloned repo +``` +cd esds +``` + +6. Add upstream to original repo and verify +``` +git remote add upstream git@github.com:NCAR/esds.git +git remote -vv +``` + +6. Create branch for new blog post and switch to it +``` +git checkout -b $BRANCH +git branch -va +``` + +7. Set tracking information for the branch +``` +git branch --set-upstream-to=origin/$BRANCH $BRANCH +``` + +9. Add and edit file(s) in the appropriate blog post folder, e.g., /posts/2023/ + * Tip: look at other posts (.md or .ipynb files) to get ideas on formatting + * To add author/date/tags to a notebook post, click on the settings icon in the top right corner of jupyterlab for the first cell of the notebook (use an existing notebook post to see formatting). + +10. When ready, add your changes +``` +git add $FILES +``` + +12. Commit your changes +``` +git commit -m "$MESSAGE" +``` + +13. Push your changes to your fork +``` +git push origin $BRANCH +``` + +15. From web, open a pull request from your fork or the main ESDS repo + * Github should prompt you to do this with a yellow bar at the top of the screen + * Add a title and description to the PR + * You can add/edit reviewers using the panel in the top right of the PR + +16. The PR may change text/code via auto-fixes from pre-commit hooks that have been set up in the repository. Be sure to pull these changes to your local clone/branch before making additional changes (e.g., as a result of the PR reviews) or you may end up with merge conflicts. +``` +git pull +``` + From 7020752b67140df6ed1d981d1f41a687b19e09d7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 16 Aug 2023 16:19:51 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- CONTRIBUTING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4fb7b2a1b..48aaba072 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,7 +34,7 @@ git branch -va git branch --set-upstream-to=origin/$BRANCH $BRANCH ``` -9. Add and edit file(s) in the appropriate blog post folder, e.g., /posts/2023/ +9. Add and edit file(s) in the appropriate blog post folder, e.g., /posts/2023/ * Tip: look at other posts (.md or .ipynb files) to get ideas on formatting * To add author/date/tags to a notebook post, click on the settings icon in the top right corner of jupyterlab for the first cell of the notebook (use an existing notebook post to see formatting). @@ -62,4 +62,3 @@ git push origin $BRANCH ``` git pull ``` -