From e8f9417ec62692108a95a9b175d48eddd6c23a9e Mon Sep 17 00:00:00 2001 From: J Date: Fri, 24 Nov 2023 22:16:35 -0800 Subject: [PATCH] Update Section2.7.b - making sure devs checkout gh-pages first --- CONTRIBUTING.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1dbc67114c..2f56092580 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -547,9 +547,11 @@ You can also sync your fork directly on GitHub by clicking "Sync Fork" at the ri #### **2.7.b Working on an issue (2): Create a new branch where you will work on your issue** -The `git checkout` command will create and change to a new branch where you will do the work on your issue. In git, the checkout command lets you navigate between different branches. Using the `-b` flag you can create a new branch and immediately switch into it. +If you have not already done so, run `git checkout gh-pages` to switch the working directory to the `gh-pages` branch and then update `gh-pages` with upstream changes as described above in Section 2.7.a. -For example,if we creating a new issue branch off [Update ‘Give’ image credit link and information - #2093](https://github.com/hackforla/website/issues/2093): +Using the `-b` flag you can also use the `git checkout` command to create a new branch and immediately switch into it. + +For example, if you create a new issue branch for [Update ‘Give’ image credit link and information - #2093](https://github.com/hackforla/website/issues/2093): ```bash git checkout -b update-give-link-2093 @@ -565,6 +567,8 @@ git checkout -b update-give-link-2093 **Note:** No law of physics will break if you don't adhere to this scheme, but laws of git will break if you add spaces. +We urge developers to be cautious using `git add`. In general it is not advisable to use `git add -all` or `git add .`. Rather, run `git status`, examine the output carefully, and then add only those files specifically related to the current issue. This will ensure that no extraneous files are included in the subsequent commit. + When you've finished working on your issue, follow the steps below to prepare your changes to push to your repository. ##### **i. What if you cannot see your changes locally within Docker?**