From 4f3039276bdd1f4503dcff808701987f2db8a3df Mon Sep 17 00:00:00 2001 From: averdin2 Date: Mon, 26 Apr 2021 19:27:08 -0700 Subject: [PATCH 01/15] Got Akibs Changes --- CONTRIBUTING.md | 564 ++++++++++++++++++++++++------------------------ 1 file changed, 278 insertions(+), 286 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 677627ba1b..49465f0713 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,381 +1,383 @@ # How to Contribute -To develop the site, you'll need to first clone the repository on to your computer. For new Git users, see the [Using Git](#using-git) section below.

- -# OVERVIEW -**Set up** -1. [Join the Repo Team](#step-1-become-a-member-of-the-repository-team) - -2. [Using Git](#using-git) and [Fork the Repo](#step-2-fork-the-repository) - -3. [Clone to your local machine](#step-3-clone-your-online-repository-to-your-local-computer) - -4. [Set up Docker](#step-4-setting-up-docker) - -**Before you start working on an issue** - -5. [Read Hack for LA's Site Architecture to get acquainted with how the website is structured](https://github.com/hackforla/website/wiki/Hack-for-LA's-Site-Architecture) - -6. [Switch to new issue branch before you start making changes](#step-6-change-to-a-new-branch) - - -**After you've worked on your issue and before you make a pull request:** - -7. [Check upstream before you push](#step-7-check-upstream-before-you-push). - -8. [No changes in the upstream repo](#step-7a-no-changes-in-the-upstream-repository) - -**Or** - -9. [Conflicting changes in the upstream repo](#step-7b-conflicting-changes-in-the-upstream-repository) and how to resolve them - -**Okay. You're good to go!** - -10. [Complete the pull request](#step-8-complete-the-pull-request) - ---- - -### Forking and cloning the repository with proper security - -#### Step 1: Become a member of the repository Team +πŸ‘πŸŽ‰ First off, thanks for taking the time to contribute! πŸŽ‰πŸ‘ + +The following is a set of guidelines for contributing to the website repository, which is hosted on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. + +** The guide below assumes that you already have a github account. If you do not have a github account yet, [Sign Up Here](https://github.com/join) +

+ +# Table of Contents +### Setting up the development envirnoment +1. [Join the repository team](#Join-the-repository-team) +2. [Fork the repository](#Fork-the-repository) +3. [Clone the forked repository](#Clone-the-forked-repository) +4. [Set up Docker](#Set-up-Docker-[4]) +5. [Build and serve the website locally](#Build-and-serve-the-website-locally) +### Working on your first issue and making your first pull request +1. [Working on your first issue](#Working-on-your-first-issue) + - [Check current branch](#Check-current-branch) + - [Create a new branch where you will work on your issue](#Create-a-new-branch-where-you-will-work-on-your-issue) + - [Prepare your changes to push to your repository](#Prepare-your-changes-to-push-to-your-repository) + + - [Check upstream before you push](#Check-upstream-before-you-push) + - [No conflicting changes in upstream repository]() + - [Conflicting changes in upstream respoitory]() +2. [Making your first pull request](#Making-your-first-pull-request) +### Resources and Documentation +1. [Hack for LA's Site Architecture](https://github.com/hackforla/website/wiki/Hack-for-LA's-Site-Architecture) +2. [GitHub Pages](https://pages.github.com/) +3. [Jekyll Docs](https://jekyllrb.com) +4. [Github Guides](https://guides.github.com/) +5. [Docker](https://docs.docker.com/get-started/) + - [Docker Compose](https://docs.docker.com/compose/gettingstarted/) + - [Docker Desktop](https://docs.docker.com/install/) + + +# Setting up the development envirnoment +## Join the repository team In the `hfla-site` slack channel, send your GitHub name to the project manager (or on the slack channel thread) and we'll add you as a member to the GitHub repository Team. Once you have accepted the GitHub invite (comes via email or in your GitHub notifications), please do the following: -1. Mark your own membership public https://help.github.com/en/articles/publicizing-or-hiding-organization-membership#changing-the-visibility-of-your-organization-membership - -1. Setup two factor authentication on your account https://github.com/hackforla/governance/issues/20 - - -## Using Git - -This section discusses some tips and best practices for working with Git. - -### Making changes, committing and pushing - -1. Generally changes start on your local clone of your fork of this repository, in your own branch. - -1. Commit your changes with a comment related to the issue it addresses to your local repository. - -1. Push that commit(s) to your online GitHub fork. +1. Mark your own membership public following this [guide](https://help.github.com/en/articles/publicizing-or-hiding-organization-membership#changing-the-visibility-of-your-organization-membership) -1. From the `hackforla` repository, create a Pull Request which asks `hackforla` to pull changes from your fork into the main repository. +2. Setup two factor authentication on your account following [this](https://docs.github.com/en/github/authenticating-to-github/configuring-two-factor-authentication) -1. After the owner of the `hackforla` repository approves and merges your Pull Request, your changes will be live on the website. -#### Step 2: Fork the repository +## Fork the repository -In https://github.com/hackforla/website, look for the fork icon in the top right. Click it and create a fork of the repository. +You can fork the hackforla/website repository by clicking +. A fork is a copy of the repository that will be placed on your GitHub account. -For git beginners, a fork is a copy of the repository that will be placed on your GitHub account url. - -It should create a copy here: https://github.com/your_GitHub_user_name/website, where `your_GitHub_user_name` is replaced with exactly that. +It should create a copy here -> `https://github.com/your_GitHub_user_name/website`, +where `your_GitHub_user_name` is replaced with exactly that. Note that this copy is on a remote server on the GitHub website and not on your computer yet. If you click the icon again, it will not create a new fork but instead give you the URL associated with your fork. -#### Step 3: Clone your online repository to your local computer +## Clone the forked repository -For git beginners, this process will create a third copy of the repository on your local desktop. +The assumption from here on out is you have git installed on your system. If that is not the case. You can find instructions for installing git on your operating system [**here**](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).The following steps will create a third copy of the repository on your local desktop. -First create a new folder on your desktop that will contain `hackforla` projects. + 1. Create a new folder on your desktop that will contain `hackforla` projects. -In your shell, navigate there then run the following commands: + In your shell, navigate there then run the following commands: -```bash -git clone https://github.com/your_GitHub_user_name/website.git -``` + ```bash + git clone https://github.com/your_GitHub_user_name/website.git + ``` -You should now have a new folder in your `hackforla` folder called `website`. Verify this by changing into the new directory: -```bash -cd website -``` + You should now have a new folder in your `hackforla` folder called `website`. Verify this by changing into the new directory: + ```bash + cd website + ``` -Next, verify that your local cloned repository is pointing to the correct `origin` URL (that is, the forked repo on your own Github account): + 2. Verify that your local cloned repository is pointing to the correct `origin` URL (that is, the forked repo on your own Github account): -```bash -git remote -v -``` -You should see `fetch` and `push` URLs with links to your forked repository under your account (i.e. `https://github.com/YOURUSERNAME/website.git`). You are all set to make working changes to the website on your local machine. + ```bash + git remote -v + ``` + You should see `fetch` and `push` URLs with links to your forked repository under your account (i.e. `https://github.com/YOURUSERNAME/website.git`). You are all set to make working changes to the website on your local machine. -However, we still need a way to keep our local repo up to date with the deployed website. To do so, you must add an upstream remote to incorporate changes made while you are working on your local repo. Run the following to add an upstream remote URL & update your local repo with recent changes to the `hackforla` version: + However, we still need a way to keep our local repo up to date with the deployed website. To do so, you must add an upstream remote to incorporate changes made while you are working on your local repo. Run the following to add an upstream remote URL & update your local repo with recent changes to the `hackforla` version: -```bash -git remote add upstream https://github.com/hackforla/website.git -git fetch upstream -``` -After adding the upstream remote, you should now see it if you again run `git remote -v` : -```bash -origin https://github.com/YOURUSERNAME/website.git (fetch) -origin https://github.com/YOURUSERNAME/website.git (push) -upstream https://github.com/hackforla/website.git (fetch) -upstream https://github.com/hackforla/website.git (push) + ```bash + git remote add upstream https://github.com/hackforla/website.git + git fetch upstream + ``` -``` -If you accidentally cloned using the repository URL from the HackForLA Github (instead of the fork on your Github), then you can correct that with the following two commands: + After adding the upstream remote, you should now see it if you again run `git remote -v` : + ```bash + origin https://github.com/YOURUSERNAME/website.git (fetch) + origin https://github.com/YOURUSERNAME/website.git (push) + upstream https://github.com/hackforla/website.git (fetch) + upstream https://github.com/hackforla/website.git (push) + ``` +
+ If you accidentally cloned using the repository URL from the HackForLA Github (instead of the fork on your Github) + -1) Set your forked repo on your Github as an `origin` remote: + 1) Set your forked repo on your Github as an `origin` remote: -```bash -git remote set-url origin https://github.com/your_user_name/website.git -``` - -2) Add another remote called `upstream` that points to the `hackforla` version of the repository. This will allow you to incorporate changes later: - -```bash -git remote add upstream https://github.com/hackforla/website.git -``` -#### Step 4: Setting up Docker + ```bash + git remote set-url origin https://github.com/your_user_name/website.git + ``` -Docker is the recommended approach to quickly getting started with local development. (ELI5: Docker helps create a local/offline version of the hackforla.org website on your computer so you can test out your code before submitting a pull request). + 2) Add another remote called `upstream` that points to the `hackforla` version of the repository. This will allow you to incorporate changes later: -There are two pre-requisites: Docker and Docker Compose. -The recommended installation method is [Docker Desktop](https://docs.docker.com/install/) for Windows 10 64-bit, -Mac, and Linux users. + ```bash + git remote add upstream https://github.com/hackforla/website.git + ``` +
+## Set up Docker -More on using Docker and the concepts of containerization: +Docker is the recommended approach to quickly getting started with local development. Docker helps create a local/offline version of the hackforla.org website on your computer so you can test out your code before submitting a pull request -* [Get started with Docker](https://docs.docker.com/get-docker/) -* [Get started with Docker Compose](https://docs.docker.com/compose/gettingstarted/) +The recommended installation method for your operating system can be found [here](https://docs.docker.com/install/). Feel free to reach out in the hfla slack channel if you have trouble installing docker on your system -*Ensure you run the `docker` commands below from a shell inside the local directory containing your clone of this repository.* +
+Docker Installation Troubleshooting If you are on Windows and get 'You are not allowed to use Docker, you must be in the "docker-users" group' as an error message, the following wiki page is a guide for solving te issue: -* [Windows docker-users group error guide](https://github.com/hackforla/website/wiki/Adding-local-user-accounts-to-the-docker-users-group-on-Windows-10) +- [Windows docker-users group error guide](https://github.com/hackforla/website/wiki/Adding-local-user-accounts-to-the-docker-users-group-on-Windows-10) + +Installing WSL2 on windows +- https://docs.microsoft.com/en-us/windows/wsl/install-win10 +
-### Build and serve the website locally +## Build and serve the website locally +### Build Up -This command starts a jekyll server locally. The server watches for changes to +- This command starts a jekyll server locally. The server watches for changes to the source files and rebuilds and refreshes the site automatically in your browser. -```bash -docker-compose up -``` + Navigate to within the `website` directory that you cloned earlier in your terminal then run the below command -Now browse to http://localhost:4000 + ```bash + docker-compose up + ``` -### Tear down + Running the above command will result in the following output in your terminal -To stop and completely remove the jekyll server (i.e. the running Docker container): +
+ Terminal Output -*(do this anytime Docker or jekyll configuration or other repository settings change)* + ```bash + Starting hfla_site ... done + Attaching to hfla_site + hfla_site | ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux-musl] + hfla_site | Configuration file: _config.yml + hfla_site | Configuration file: _config.docker.yml + hfla_site | Source: . + hfla_site | Destination: /srv/jekyll/_site + hfla_site | Incremental build: enabled + hfla_site | Generating... + hfla_site | done in 33.641 seconds. + hfla_site | Auto-regeneration may not work on some Windows versions. + hfla_site | Please see: https://github.com/Microsoft/BashOnWindows/issues/216 + hfla_site | If it does not work, please upgrade Bash on Windows or run Jekyll with --no-watch. + hfla_site | Auto-regeneration: enabled for '.' + hfla_site | LiveReload address: http://0.0.0.0:35729 + hfla_site | Server address: http://0.0.0.0:4000/ + hfla_site | Server running... press ctrl-c to stop. + ``` -```bash -docker-compose down -``` +
-To stop the server, but not destroy it (often sufficient for day-to-day work): + When you see the above output, it means the site is now running and now you can browse to http://localhost:4000 -```bash -docker-compose stop -``` +### Tear Down -Bring the same server back up later with: + - To stop and completely remove the jekyll server (i.e. the running Docker container): -```bash -docker-compose up -``` -
+ *(do this anytime Docker or jekyll configuration or other repository settings change)* -#### Step 5: Read [Hack for LA's Site Architecture](https://github.com/hackforla/website/wiki/Hack-for-LA's-Site-Architecture) to get acquainted with how the website is structured + ```bash + docker-compose down + ``` -#### Step 6: Work on an issue using git + To stop the server, but not destroy it (often sufficient for day-to-day work): -Create a new branch for each issue you work on. Doing all your work on topic branches leaves your repository's main branch (named `gh-pages`) unmodified and greatly simplifies keeping your fork in sync with the main project. + ```bash + docker-compose stop + ``` -a) Check current branch + Bring the same server back up later with: -The `git branch` command will let you know what branch you are in, and what branch names are already in use. + ```bash + docker-compose up + ``` -```bash -git branch -``` +# Working on your first issue and making your first pull request -You will see a list of all of your branches. There will be a star (`*`) next to the branch that you are currently in. By default you should start on the `gh-pages` branch. +## Working on your first issue -Note: when you work on future issues, you must always be in the `gh-pages` branch when creating a new branch. +Create a new branch for each issue you work on. Doing all your work on topic branches leaves your repository's main branch (named `gh-pages`) unmodified and greatly simplifies keeping your fork in sync with the main project. -If you are not currently in the `gh-pages` branch, run the following command to return to it: +1. ### Check current branch -```bash -git checkout gh-pages -``` + The `git branch` command will let you know what branch you are in, and what branch names are already in use. -b) Create a new branch where you will work on your issue + ```bash + git branch + ``` -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. + You will see a list of all of your branches. There will be a star (`*`) next to the branch that you are currently in. By default you should start on the `gh-pages` branch. -To create a new issue branch, and switch into it: + ** *when you work on future issues, you must always be in the `gh-pages` branch when creating a new branch.* -```bash -git checkout -b fix-logo-width-311 -``` + If you are not currently in the `gh-pages` branch, run the following command to return to it: -The text after the `-b`, in the example `fix-logo-width-311`, will be the name of your new branch. Choose a branch name that relates to the issue you're working on. (No spaces!) + ```bash + git checkout gh-pages + ``` -The format should look like the scheme above where the words are a brief description of the issue that will make sense at a glance to someone unfamiliar with the issue. +2. ### Create a new branch where you will work on your issue -No law of physics will break if you don't adhere to this scheme, but laws of git will break if you add spaces. + 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. -When you've finished working on your issue, follow the steps below to prepare your changes to push to your repository. + To create a new issue branch, and switch into it: -c) Prepare your changes to push to your repository + ```bash + git checkout -b fix-logo-width-311 + ``` -Once you are done with the work on your issue you will push it to your repository. Before you can push your work to your repository, you will stage and commit your changes. These two commands are similar to the save command that you have used to in other programs. + The text after the `-b`, in the example `fix-logo-width-311`, will be the name of your new branch. Choose a branch name that relates to the issue you're working on. (No spaces!) -> - If you are using Visual studios code you can use the Git graphical user interface to stage your changes. For instructions check out the [Git gui wiki] (https://github.com/hackforla/website/wiki/Using-Git-GUI-(Graphical-user-Interface)-in-Visual-Studios-Code) -> Alternatively you can follow the intstructions below to stage changes through the terminal. + The format should look like the scheme above where the words are a brief description of the issue that will make sense at a glance to someone unfamiliar with the issue. + *No law of physics will break if you don't adhere to this scheme, but laws of git will break if you add spaces.* --Use the `git add` command to stage your changes. -This command prepares your changes before you commit them. You can stage files one at a time using the filename. + When you've finished working on your issue, follow the steps below to prepare your changes to push to your repository. -Run the command: -```bash -git add β€œfilename.ext” -``` +3. ### Prepare your changes to push to your repository --Use the `git status` command to see what files are staged. + Once you are done with the work on your issue you will push it to your repository. Before you can push your work to your repository, you will stage and commit your changes. These two commands are similar to the save command that you have used to in other programs. -This command will list the files that have been staged. These are the files that will be committed (saved) when you run the next command, `git commit`. Please be sure all your staged changes are relevant to the issue you are working on. If you find you have included unrelated changes, please unstage them before making this commit - and then make a new commit for the unrelated changes. (The commands for unstaging commits are provided in the output of your `git status` command.) + ** *If you are using Visual studios code you can use the Git graphical user interface to stage your changes. For instructions check out the [Git Gui Wiki](https://github.com/hackforla/website/wiki/Using-Git-GUI-(Graphical-user-Interface)-in-Visual-Studios-Code)* + -```bash -git status -``` --Use the `git reset HEAD` command to remove a staged file. + - Use the `git add` command to stage your changes. + This command prepares your changes before you commit them. You can stage files one at a time using the filename. -This command will remove a file that has been staged. This file will not be committed (saved) when you run the next command, `git commit`. This only works if the wrong files were added, but they were not yet committed. The file will be removed from the staging area, but not actually deleted: -```bash -git reset HEAD β€œfilename.ext” -``` + Run the command: + ```bash + git add β€œfilename.ext” + ``` --Use the `git commit` command + - Use the `git status` command to see what files are staged -This command saves your work, and prepares it to push to your repository. Use the `-m` flag to quickly add a message to your commit. Your message should be a short description of the issue you are working. It will be extremely helpful if other people can understand your message, so try to reisst the temptation to be overly cryptic. + This command will list the files that have been staged. These are the files that will be committed (saved) when you run the next command, `git commit`. Please be sure all your staged changes are relevant to the issue you are working on. If you find you have included unrelated changes, please unstage them before making this commit - and then make a new commit for the unrelated changes. (The commands for unstaging commits are provided in the output of your `git status` command.) -To commit your changes with a message, run: -```bash -git commit -m β€œinsert message here” -``` -Congratulations! You are now ready to push your work to your repository. + - Use the `git reset HEAD` command to remove a staged file. -#### Step 7: Check upstream before you push + This command will remove a file that has been staged. This file will not be committed (saved) when you run the next command, `git commit`. This only works if the wrong files were added, but they were not yet committed. The file will be removed from the staging area, but not actually deleted: + ```bash + git reset HEAD β€œfilename.ext” + ``` -Before you push your local commits to your repository, check to see if there have been updates made in the main Hack For LA website repository. `git fetch` will check remote repositories for changes without altering your local repository. + - Use the `git commit` command -```bash -git fetch upstream -``` + This command saves your work, and prepares it to push to your repository. Use the `-m` flag to quickly add a message to your commit. Your message should be a short description of the issue you are working. It will be extremely helpful if other people can understand your message, so try to reisst the temptation to be overly cryptic. -##### Step 7a: No changes in the upstream repository + To commit your changes with a message, run: + ```bash + git commit -m β€œinsert message here” + ``` -If you do not see any output, there have not been any changes in the -main Hack for LA website repository since the last time you -checked. So it is safe to push your local commits to your fork. +4. ### Check upstream before you push -If you just type `git push` you will be prompted to create a new branch in your GitHub repository. The more complete command below will create a new branch on your copy of the website repository, and then push your local branch there. The name at the end of this command should be the same as the name of the local branch that you created back in step 6, as in the example below: + Before you push your local commits to your repository, check to see if there have been updates made in the main Hack For LA website repository. `git fetch` will check remote repositories for changes without altering your local repository. -```bash -git push --set-upstream origin fix-logo-width-311 -``` + ```bash + git fetch upstream + ``` -##### Step 7b: conflicting changes in the upstream repository + -
+ No changes in the upstream repository -When you check the upstream repository, you may see output like this: + If you do not see any output, there have not been any changes in the + main Hack for LA website repository since the last time you + checked. So it is safe to push your local commits to your fork. -```bash -Fetching upstream -remote: Enumerating objects: 11, done. -remote: Counting objects: 100% (11/11), done. -remote: Compressing objects: 100% (7/7), done. -remote: Total 11 (delta 5), reused 7 (delta 4), pack-reused 0 -Unpacking objects: 100% (11/11), 8.25 KiB | 402.00 KiB/s, done. -From https://github.com/hackforla/website - + 770d667...14f9f46 Bonnie -> hackforla/Bonnie (forced update) - * [new branch] bonnie -> hackforla/bonnie - 5773ebe..0c86ecd gh-pages -> hackforla/gh-pages -``` + If you just type `git push` you will be prompted to create a new branch in your GitHub repository. The more complete command below will create a new branch on your copy of the website repository, and then push your local branch there. The name at the end of this command should be the same as the name of the local branch that you created back in step 3, as in the example below: -You can safely ignore changes in other issue branches, such as -`bonnie` above. But if you see changes in gh-pages, as in -`5773ebe..0c86ecd gh-pages -> hackforla/gh-pages`, you should -incorporate those changes into your repository before merging or -rebasing your issue branch. Use the [instructions below](#incorporating-changes-from-upstream) -to bring your fork up to date with the main repository. + ```bash + git push --set-upstream origin fix-logo-width-311 + ``` +
+ -
+ Conflicting changes in the upstream repository + When you check the upstream repository, you may see output like this: -### Incorporating changes from upstream + ```bash + Fetching upstream + remote: Enumerating objects: 11, done. + remote: Counting objects: 100% (11/11), done. + remote: Compressing objects: 100% (7/7), done. + remote: Total 11 (delta 5), reused 7 (delta 4), pack-reused 0 + Unpacking objects: 100% (11/11), 8.25 KiB | 402.00 KiB/s, done. + From https://github.com/hackforla/website + + 770d667...14f9f46 Bonnie -> hackforla/Bonnie (forced update) + * [new branch] bonnie -> hackforla/bonnie + 5773ebe..0c86ecd gh-pages -> hackforla/gh-pages + ``` -Your fork of this repository on GitHub, and your local clone of that fork, will -get out of sync with this (upstream) repository from time to time. (That's what has happend when you see something like "This branch is 1 commit behind hackforla:gh-pages" on the github website version of your hackforla repository.) + You can safely ignore changes in other issue branches, such as + `bonnie` above. But if you see changes in gh-pages, as in + `5773ebe..0c86ecd gh-pages -> hackforla/gh-pages`, you should + incorporate those changes into your repository before merging or + rebasing your issue branch. Use the [instructions below](#incorporating-changes-from-upstream) + to bring your fork up to date with the main repository. -One way to keep your fork up to date with this repository is to follow -these instruction: [Syncing your fork to the original repository via the browser](https://github.com/KirstieJane/STEMMRoleModels/wiki/Syncing-your-fork-to-the-original-repository-via-the-browser) -You can also update your fork via the local clone of your fork, using -these instructions. Assuming you have a local clone with remotes -`upstream` (this repo) and `origin` (your GitHub fork of this repo): + ### Incorporating changes from upstream -First, you will need to create a local branch which tracks upstream/gh-pages. You will only need to do this once; you do not need to do this every time you want to incorporate upstream changes. + Your fork of this repository on GitHub, and your local clone of that fork, will + get out of sync with this (upstream) repository from time to time. (That's what has happend when you see something like "This branch is 1 commit behind hackforla:gh-pages" on the github website version of your hackforla repository.) -Run the following two commands: + One way to keep your fork up to date with this repository is to follow + these instruction: [Syncing your fork to the original repository via the browser](https://github.com/KirstieJane/STEMMRoleModels/wiki/Syncing-your-fork-to-the-original-repository-via-the-browser) -```bash -git fetch upstream -git checkout -b upstream-gh-pages --track upstream/gh-pages -``` + You can also update your fork via the local clone of your fork, using + these instructions. Assuming you have a local clone with remotes + `upstream` (this repo) and `origin` (your GitHub fork of this repo): -If you have already created the branch upstream-gh-pages, the following commands will incorporate upstream changes: + First, you will need to create a local branch which tracks upstream/gh-pages. You will only need to do this once; you do not need to do this every time you want to incorporate upstream changes. -```bash -git checkout upstream-gh-pages # Move to the branch you want to merge with. -git pull # This updates your tracking branch to match the gh-pages branch in this repository -git checkout gh-pages # Move back to your gh-pages branch -git merge upstream-gh-pages # Merge to bring your gh-pages current. -``` -If you do all your work on topic branches (as suggested above) and keep gh-pages free of local modifications, this merge should apply cleanly. + Run the following two commands: -Then push the merge changes to your GitHub fork: + ```bash + git fetch upstream + git checkout -b upstream-gh-pages --track upstream/gh-pages + ``` -```bash -git push -``` -If you go to your online github repository this should remove the message "This branch is x commit behind hackforla:gh-pages". + If you have already created the branch upstream-gh-pages, the following commands will incorporate upstream changes: -#### Incorporating changes into your topic branch + ```bash + git checkout upstream-gh-pages # Move to the branch you want to merge with. + git pull # This updates your tracking branch to match the gh-pages branch in this repository + git checkout gh-pages # Move back to your gh-pages branch + git merge upstream-gh-pages # Merge to bring your gh-pages current. + ``` + If you do all your work on topic branches (as suggested above) and keep gh-pages free of local modifications, this merge should apply cleanly. -To incorporate these updates from the main GitHub repository into your -topic branch, you can 'rebase' your branch onto your updated gh-pages -branch. NOTE you should only rebase if you have never pushed your -topic branch to GitHub (or shared it with another collaborator). + Then push the merge changes to your GitHub fork: -```bash -git checkout fix-logo-width-311 -git rebase gh-pages -``` + ```bash + git push + ``` + If you go to your online github repository this should remove the message "This branch is x commit behind hackforla:gh-pages". -If you receive warnings about conflicts, abort the rebase with `git -rebase --abort` and instead merge gh-pages into your branch. + #### Incorporating changes into your topic branch -```bash -git checkout fix-logo-width-311 -git merge gh-pages -``` + To incorporate these updates from the main GitHub repository into your + topic branch, you can 'rebase' your branch onto your updated gh-pages + branch. NOTE you should only rebase if you have never pushed your + topic branch to GitHub (or shared it with another collaborator). -#### Step 8: Status Updates + ```bash + git checkout fix-logo-width-311 + git rebase gh-pages + ``` -If you have not submitted a pull request make sure to write a weekly status update on your issue before the Sunday meeting. Follow the format below and add pictures of any visual changes made to the site. + If you receive warnings about conflicts, abort the rebase with `git + rebase --abort` and instead merge gh-pages into your branch. -1. Progress: "What is the current status of your project? What have you completed and what is left to do?" -2. Blockers: "Difficulties or errors encountered." -3. Availability: "How much time will you have this week to work on this issue?" -4. ETA: "When do you expect this issue to be completed?" -5. Pictures: "Add any pictures of the visual changes made to the site so far." - -#### Step 9: Complete the pull request + ```bash + git checkout fix-logo-width-311 + git merge gh-pages + ``` +
+ +## Making your first pull request + +Start with pushing your changes to your remote repository ```bash git push --set-upstream origin fix-logo-width-311 @@ -396,13 +398,9 @@ your pull request is accepted and merged. Once you have finished working on the issue you have chosen, commit the changes to your local branch (e.g. `fix-logo-width-311`). -Important: After you completed your assignment and committed all of the changes, before moving onto your next issue and creating a new branch, you must leave your current branch and return to the `gh-pages` branch. From there you can checkout into a new branch. (This ensures you don’t accidentally include the changes from your previous branch in your new branch). +

NOTE: After you completed your assignment and committed all of the changes, before moving onto your next issue and creating a new branch, you must leave your current branch and return to the `gh-pages` branch. From there you can checkout into a new branch. (This ensures you don’t accidentally include the changes from your previous branch in your new branch).

-Run the following command to return to the `gh-pages` branch: - -```bash -git checkout gh-pages -``` +Run `git checkout gh-pages` to return to the `gh-pages` branch: From here, once your pull request is approved and merged you can pull the recent merge from the Hack For LA repository and delete your local branch: ```bash @@ -411,25 +409,19 @@ git branch -d ``` Managing branches this way will keep the commit logs cleaner on the Hack For LA repository, versus merging your completed feature branches into your local repo. -Now you are all set to work on a new PR. Start over on Step 6. - -#### Edits to pull request -If you find an error in your code or your reviewer asks you to make a change, please avoid editing your code directly from the pull request. Instead update it in your local branch first and then push it to your origin remote. This will update the original pull request. - -## Useful Links - -### Supported Platforms +<<<<<<< HEAD +
+Edits to pull request +======= - [ghpages](https://pages.github.com/) - [jekyll](https://jekyllrb.com) - [jekyllcli](https://jekyllrb.com/docs/usage/) +>>>>>>> upstream-gh-pages -### Tutorials +If you find an error in your code or your reviewer asks you to make a change, please avoid editing your code directly from the pull request. Instead update it in your local branch first and then push it to your origin remote. This will update the original pull request. -- [Github Guides](https://guides.github.com/) -- [docker](https://docs.docker.com/get-started/) -- [dockercompose](https://docs.docker.com/compose/gettingstarted/) -- [dockerdesktop](https://docs.docker.com/install/) +
+

πŸŽ‰πŸŽ‰πŸŽ‰Congratulations! You have successfully made your first pull request. Thank you for contributing !πŸŽ‰πŸŽ‰πŸŽ‰


-[Back to Top](#overview) From 99b7826d2adcc087b859d5a86af9e9adeed339f8 Mon Sep 17 00:00:00 2001 From: Alex Verdin Date: Mon, 26 Apr 2021 20:42:01 -0700 Subject: [PATCH 02/15] Update CONTRIBUTING.md file --- CONTRIBUTING.md | 42 ++++++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 49465f0713..6fcf5eda29 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,11 +4,11 @@ The following is a set of guidelines for contributing to the website repository, which is hosted on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. -** The guide below assumes that you already have a github account. If you do not have a github account yet, [Sign Up Here](https://github.com/join) +** The guide below assumes that you have completed the onboarding process which includes joining the Hack for LA Slack, GitHub, and Google Drive. If you have not been onboarded, please refer to the [Getting Started Page](https://www.hackforla.org/getting-started).

# Table of Contents -### Setting up the development envirnoment +### Setting up the development environment 1. [Join the repository team](#Join-the-repository-team) 2. [Fork the repository](#Fork-the-repository) 3. [Clone the forked repository](#Clone-the-forked-repository) @@ -34,16 +34,16 @@ The following is a set of guidelines for contributing to the website repository, - [Docker Desktop](https://docs.docker.com/install/) -# Setting up the development envirnoment +# Setting up the development environment ## Join the repository team -In the `hfla-site` slack channel, send your GitHub name to the project manager (or on the slack channel thread) and we'll add you as a member to the GitHub repository Team. +In the `hfla-site` Slack channel, send an introductory message with your GitHub handle/username asking to be added to the Hack for LA website GitHub repository (this repository). Once you have accepted the GitHub invite (comes via email or in your GitHub notifications), please do the following: -1. Mark your own membership public following this [guide](https://help.github.com/en/articles/publicizing-or-hiding-organization-membership#changing-the-visibility-of-your-organization-membership) +1. Make your own Hack for LA GitHub organization membership public by following this [guide](https://help.github.com/en/articles/publicizing-or-hiding-organization-membership#changing-the-visibility-of-your-organization-membership). -2. Setup two factor authentication on your account following [this](https://docs.github.com/en/github/authenticating-to-github/configuring-two-factor-authentication) +2. Set up two-factor authentication on your account by following this [guide](https://docs.github.com/en/github/authenticating-to-github/configuring-two-factor-authentication). ## Fork the repository @@ -51,23 +51,37 @@ Once you have accepted the GitHub invite (comes via email or in your GitHub noti You can fork the hackforla/website repository by clicking . A fork is a copy of the repository that will be placed on your GitHub account. -It should create a copy here -> `https://github.com/your_GitHub_user_name/website`, -where `your_GitHub_user_name` is replaced with exactly that. +It should create a URL that looks like the following -> `https://github.com//website`. -Note that this copy is on a remote server on the GitHub website and not on your computer yet. +For example -> `https://github.com/octocat/website`. -If you click the icon again, it will not create a new fork but instead give you the URL associated with your fork. +Note that this forked copy is a remote version on GitHub. It is not yet on your local machine :octocat:. ## Clone the forked repository -The assumption from here on out is you have git installed on your system. If that is not the case. You can find instructions for installing git on your operating system [**here**](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).The following steps will create a third copy of the repository on your local desktop. +Before cloning your forked repository to your local machine, you must have Git installed. You can find instructions for installing Git for your operating system [**here**](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). - 1. Create a new folder on your desktop that will contain `hackforla` projects. +The following steps will create a local copy of the repository on your machine. - In your shell, navigate there then run the following commands: + 1. Create a new folder on your machine that will contain `hackforla` projects. + In your command line interface (Terminal, Git Bash, Powershell), navigate into the folder(directory) you just created. + + For example: ```bash - git clone https://github.com/your_GitHub_user_name/website.git + cd Desktop + cd hackforla + ``` + + and run the following commands: + + ```bash + git clone https://github.com//website.git + ``` + + For example: + ```bash + git clone https://github.com/octocat/website.git ``` You should now have a new folder in your `hackforla` folder called `website`. Verify this by changing into the new directory: From 4dfdc10b3976361924b43cd56107d6f7f780ef7e Mon Sep 17 00:00:00 2001 From: averdin2 Date: Mon, 3 May 2021 14:21:08 -0700 Subject: [PATCH 03/15] Accepted incoming merge conflict --- CONTRIBUTING.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 49465f0713..e52a727e17 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -410,14 +410,9 @@ git branch -d Managing branches this way will keep the commit logs cleaner on the Hack For LA repository, versus merging your completed feature branches into your local repo. -<<<<<<< HEAD -
-Edits to pull request -======= - [ghpages](https://pages.github.com/) - [jekyll](https://jekyllrb.com) - [jekyllcli](https://jekyllrb.com/docs/usage/) ->>>>>>> upstream-gh-pages If you find an error in your code or your reviewer asks you to make a change, please avoid editing your code directly from the pull request. Instead update it in your local branch first and then push it to your origin remote. This will update the original pull request. From e74bfaf784856057d90d898c492d705e8f34b162 Mon Sep 17 00:00:00 2001 From: Alex Verdin Date: Mon, 3 May 2021 14:36:43 -0700 Subject: [PATCH 04/15] Made github username wording more consistent --- CONTRIBUTING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e30f12f707..b8d14e1390 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -94,7 +94,7 @@ The following steps will create a local copy of the repository on your machine. ```bash git remote -v ``` - You should see `fetch` and `push` URLs with links to your forked repository under your account (i.e. `https://github.com/YOURUSERNAME/website.git`). You are all set to make working changes to the website on your local machine. + You should see `fetch` and `push` URLs with links to your forked repository under your account (i.e. `https://github.com//website.git`). You are all set to make working changes to the website on your local machine. However, we still need a way to keep our local repo up to date with the deployed website. To do so, you must add an upstream remote to incorporate changes made while you are working on your local repo. Run the following to add an upstream remote URL & update your local repo with recent changes to the `hackforla` version: @@ -105,8 +105,8 @@ The following steps will create a local copy of the repository on your machine. After adding the upstream remote, you should now see it if you again run `git remote -v` : ```bash - origin https://github.com/YOURUSERNAME/website.git (fetch) - origin https://github.com/YOURUSERNAME/website.git (push) + origin https://github.com//website.git (fetch) + origin https://github.com//website.git (push) upstream https://github.com/hackforla/website.git (fetch) upstream https://github.com/hackforla/website.git (push) ``` @@ -117,7 +117,7 @@ The following steps will create a local copy of the repository on your machine. 1) Set your forked repo on your Github as an `origin` remote: ```bash - git remote set-url origin https://github.com/your_user_name/website.git + git remote set-url origin https://github.com//website.git ``` 2) Add another remote called `upstream` that points to the `hackforla` version of the repository. This will allow you to incorporate changes later: From 06cad6889143416a644a01d40615810f9824de6d Mon Sep 17 00:00:00 2001 From: Alex Verdin Date: Mon, 3 May 2021 14:44:13 -0700 Subject: [PATCH 05/15] Added documentation for using Docker back to the file --- CONTRIBUTING.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b8d14e1390..cdd4a09438 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -128,10 +128,15 @@ The following steps will create a local copy of the repository on your machine.
## Set up Docker -Docker is the recommended approach to quickly getting started with local development. Docker helps create a local/offline version of the hackforla.org website on your computer so you can test out your code before submitting a pull request +Docker is the recommended approach to quickly getting started with local development. Docker helps create a local/offline version of the hackforla.org website on your computer so you can test out your code before submitting a pull request. The recommended installation method for your operating system can be found [here](https://docs.docker.com/install/). Feel free to reach out in the hfla slack channel if you have trouble installing docker on your system +More on using Docker and the concepts of containerization: + +* [Get started with Docker](https://docs.docker.com/get-docker/) +* [Get started with Docker Compose](https://docs.docker.com/compose/gettingstarted/) +
Docker Installation Troubleshooting From 3ffe1e437e23faeb3883b8d6176332acd264fef1 Mon Sep 17 00:00:00 2001 From: Alex Verdin Date: Mon, 3 May 2021 14:59:36 -0700 Subject: [PATCH 06/15] Added git status code back to file --- CONTRIBUTING.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cdd4a09438..88169a5810 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -270,6 +270,10 @@ Create a new branch for each issue you work on. Doing all your work on topic bra - Use the `git status` command to see what files are staged This command will list the files that have been staged. These are the files that will be committed (saved) when you run the next command, `git commit`. Please be sure all your staged changes are relevant to the issue you are working on. If you find you have included unrelated changes, please unstage them before making this commit - and then make a new commit for the unrelated changes. (The commands for unstaging commits are provided in the output of your `git status` command.) + + ```bash + git status + ``` - Use the `git reset HEAD` command to remove a staged file. From 6e0e9b76931aa6e2ed9da0df5b4f034c399d5b22 Mon Sep 17 00:00:00 2001 From: Alex Verdin Date: Mon, 3 May 2021 15:16:04 -0700 Subject: [PATCH 07/15] Changed edits to pull request --- CONTRIBUTING.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 88169a5810..370471b36a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -432,13 +432,16 @@ git branch -d ``` Managing branches this way will keep the commit logs cleaner on the Hack For LA repository, versus merging your completed feature branches into your local repo. +Now you are all set to work on a new PR. Start over [here](#Working-on-your-first-issue). + +#### Edits to pull request +If you find an error in your code or your reviewer asks you to make a change, please avoid editing your code directly from the pull request. Instead update it in your local branch first and then push it to your origin remote. This will update the original pull request. + - [ghpages](https://pages.github.com/) - [jekyll](https://jekyllrb.com) - [jekyllcli](https://jekyllrb.com/docs/usage/) -If you find an error in your code or your reviewer asks you to make a change, please avoid editing your code directly from the pull request. Instead update it in your local branch first and then push it to your origin remote. This will update the original pull request. -

πŸŽ‰πŸŽ‰πŸŽ‰Congratulations! You have successfully made your first pull request. Thank you for contributing !πŸŽ‰πŸŽ‰πŸŽ‰


From 7f7b3c896bbb7f7f73b6465759aa530c5f26624f Mon Sep 17 00:00:00 2001 From: Alex Verdin Date: Mon, 3 May 2021 15:22:24 -0700 Subject: [PATCH 08/15] Changed wording of issue and pull request headers --- CONTRIBUTING.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 370471b36a..e16dff72df 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,8 +14,8 @@ The following is a set of guidelines for contributing to the website repository, 3. [Clone the forked repository](#Clone-the-forked-repository) 4. [Set up Docker](#Set-up-Docker-[4]) 5. [Build and serve the website locally](#Build-and-serve-the-website-locally) -### Working on your first issue and making your first pull request -1. [Working on your first issue](#Working-on-your-first-issue) +### Working on an issue and making a pull request +1. [Working on an issue](#Working-on-an-issue) - [Check current branch](#Check-current-branch) - [Create a new branch where you will work on your issue](#Create-a-new-branch-where-you-will-work-on-your-issue) - [Prepare your changes to push to your repository](#Prepare-your-changes-to-push-to-your-repository) @@ -23,7 +23,7 @@ The following is a set of guidelines for contributing to the website repository, - [Check upstream before you push](#Check-upstream-before-you-push) - [No conflicting changes in upstream repository]() - [Conflicting changes in upstream respoitory]() -2. [Making your first pull request](#Making-your-first-pull-request) +2. [Making a pull request](#Making-a-pull-request) ### Resources and Documentation 1. [Hack for LA's Site Architecture](https://github.com/hackforla/website/wiki/Hack-for-LA's-Site-Architecture) 2. [GitHub Pages](https://pages.github.com/) @@ -210,9 +210,9 @@ the source files and rebuilds and refreshes the site automatically in your brows docker-compose up ``` -# Working on your first issue and making your first pull request +# Working on an issue and making a pull request -## Working on your first issue +## Working on an issue Create a new branch for each issue you work on. Doing all your work on topic branches leaves your repository's main branch (named `gh-pages`) unmodified and greatly simplifies keeping your fork in sync with the main project. @@ -398,7 +398,7 @@ Create a new branch for each issue you work on. Doing all your work on topic bra ``` -## Making your first pull request +## Making a pull request Start with pushing your changes to your remote repository @@ -434,7 +434,7 @@ Managing branches this way will keep the commit logs cleaner on the Hack For LA Now you are all set to work on a new PR. Start over [here](#Working-on-your-first-issue). -#### Edits to pull request +#### Edits to a pull request If you find an error in your code or your reviewer asks you to make a change, please avoid editing your code directly from the pull request. Instead update it in your local branch first and then push it to your origin remote. This will update the original pull request. From e0d8b95f5c53b78b77070cbbb050d0865a2dcdbd Mon Sep 17 00:00:00 2001 From: Alex Verdin Date: Mon, 3 May 2021 15:23:34 -0700 Subject: [PATCH 09/15] Fixed broken link in edits to a pull request --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e16dff72df..558b64b3e5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -432,7 +432,7 @@ git branch -d ``` Managing branches this way will keep the commit logs cleaner on the Hack For LA repository, versus merging your completed feature branches into your local repo. -Now you are all set to work on a new PR. Start over [here](#Working-on-your-first-issue). +Now you are all set to work on a new PR. Start over [here](#Working-on-an-issue). #### Edits to a pull request If you find an error in your code or your reviewer asks you to make a change, please avoid editing your code directly from the pull request. Instead update it in your local branch first and then push it to your origin remote. This will update the original pull request. From ab705d8b121a3d0a7941ac2ced230c614966522a Mon Sep 17 00:00:00 2001 From: Alex Verdin Date: Mon, 3 May 2021 15:27:50 -0700 Subject: [PATCH 10/15] Changed wording of first pull request in bottom greeting --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 558b64b3e5..49d1905516 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -444,5 +444,5 @@ If you find an error in your code or your reviewer asks you to make a change, pl -

πŸŽ‰πŸŽ‰πŸŽ‰Congratulations! You have successfully made your first pull request. Thank you for contributing !πŸŽ‰πŸŽ‰πŸŽ‰


+

πŸŽ‰πŸŽ‰πŸŽ‰Congratulations! You have successfully made a pull request. Thank you for contributing !πŸŽ‰πŸŽ‰πŸŽ‰


From 70384a3d1fb1bedd1b52017ba22eb31bcbf735ec Mon Sep 17 00:00:00 2001 From: Alex Verdin Date: Mon, 3 May 2021 17:04:26 -0700 Subject: [PATCH 11/15] Removed unnecessary text --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 49d1905516..74e3c15dec 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -55,7 +55,7 @@ It should create a URL that looks like the following -> `https://github.com/ `https://github.com/octocat/website`. -Note that this forked copy is a remote version on GitHub. It is not yet on your local machine :octocat:. +Note that this forked copy is a remote version on GitHub. It is not yet on your local machine. ## Clone the forked repository From fea9a090da4bd765dae32887e4d26f4d6e5a0bac Mon Sep 17 00:00:00 2001 From: averdin2 Date: Mon, 17 May 2021 12:07:55 -0700 Subject: [PATCH 12/15] Added info about VS Code and moved Changes from Upsream section --- CONTRIBUTING.md | 96 +++++++++++++++++++++++++------------------------ 1 file changed, 50 insertions(+), 46 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 74e3c15dec..08e3982e43 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,8 +5,13 @@ The following is a set of guidelines for contributing to the website repository, which is hosted on GitHub. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. ** The guide below assumes that you have completed the onboarding process which includes joining the Hack for LA Slack, GitHub, and Google Drive. If you have not been onboarded, please refer to the [Getting Started Page](https://www.hackforla.org/getting-started). + +** If you need a text editor to work on code, [VS Code](https://code.visualstudio.com/download) is recommended by the team, but feel free to use a text editor of your choice. + +** If you have any other questions about your contributing process, feel free to reach out to the team in the #hfla-site slack channel.

+ # Table of Contents ### Setting up the development environment 1. [Join the repository team](#Join-the-repository-team) @@ -285,7 +290,7 @@ Create a new branch for each issue you work on. Doing all your work on topic bra - Use the `git commit` command - This command saves your work, and prepares it to push to your repository. Use the `-m` flag to quickly add a message to your commit. Your message should be a short description of the issue you are working. It will be extremely helpful if other people can understand your message, so try to reisst the temptation to be overly cryptic. + This command saves your work, and prepares it to push to your repository. Use the `-m` flag to quickly add a message to your commit. Your message should be a short description of the issue you are working. It will be extremely helpful if other people can understand your message, so try to resist the temptation to be overly cryptic. To commit your changes with a message, run: ```bash @@ -337,66 +342,65 @@ Create a new branch for each issue you work on. Doing all your work on topic bra incorporate those changes into your repository before merging or rebasing your issue branch. Use the [instructions below](#incorporating-changes-from-upstream) to bring your fork up to date with the main repository. + +5. ### Incorporating changes from upstream - ### Incorporating changes from upstream - - Your fork of this repository on GitHub, and your local clone of that fork, will - get out of sync with this (upstream) repository from time to time. (That's what has happend when you see something like "This branch is 1 commit behind hackforla:gh-pages" on the github website version of your hackforla repository.) + Your fork of this repository on GitHub, and your local clone of that fork, will + get out of sync with this (upstream) repository from time to time. (That's what has happend when you see something like "This branch is 1 commit behind hackforla:gh-pages" on the github website version of your hackforla repository.) - One way to keep your fork up to date with this repository is to follow - these instruction: [Syncing your fork to the original repository via the browser](https://github.com/KirstieJane/STEMMRoleModels/wiki/Syncing-your-fork-to-the-original-repository-via-the-browser) + One way to keep your fork up to date with this repository is to follow + these instruction: [Syncing your fork to the original repository via the browser](https://github.com/KirstieJane/STEMMRoleModels/wiki/Syncing-your-fork-to-the-original-repository-via-the-browser) - You can also update your fork via the local clone of your fork, using - these instructions. Assuming you have a local clone with remotes - `upstream` (this repo) and `origin` (your GitHub fork of this repo): + You can also update your fork via the local clone of your fork, using + these instructions. Assuming you have a local clone with remotes + `upstream` (this repo) and `origin` (your GitHub fork of this repo): - First, you will need to create a local branch which tracks upstream/gh-pages. You will only need to do this once; you do not need to do this every time you want to incorporate upstream changes. + First, you will need to create a local branch which tracks upstream/gh-pages. You will only need to do this once; you do not need to do this every time you want to incorporate upstream changes. - Run the following two commands: + Run the following two commands: - ```bash - git fetch upstream - git checkout -b upstream-gh-pages --track upstream/gh-pages - ``` + ```bash + git fetch upstream + git checkout -b upstream-gh-pages --track upstream/gh-pages + ``` - If you have already created the branch upstream-gh-pages, the following commands will incorporate upstream changes: + If you have already created the branch upstream-gh-pages, the following commands will incorporate upstream changes: - ```bash - git checkout upstream-gh-pages # Move to the branch you want to merge with. - git pull # This updates your tracking branch to match the gh-pages branch in this repository - git checkout gh-pages # Move back to your gh-pages branch - git merge upstream-gh-pages # Merge to bring your gh-pages current. - ``` - If you do all your work on topic branches (as suggested above) and keep gh-pages free of local modifications, this merge should apply cleanly. + ```bash + git checkout upstream-gh-pages # Move to the branch you want to merge with. + git pull # This updates your tracking branch to match the gh-pages branch in this repository + git checkout gh-pages # Move back to your gh-pages branch + git merge upstream-gh-pages # Merge to bring your gh-pages current. + ``` + If you do all your work on topic branches (as suggested above) and keep gh-pages free of local modifications, this merge should apply cleanly. - Then push the merge changes to your GitHub fork: + Then push the merge changes to your GitHub fork: - ```bash - git push - ``` - If you go to your online github repository this should remove the message "This branch is x commit behind hackforla:gh-pages". + ```bash + git push + ``` + If you go to your online github repository this should remove the message "This branch is x commit behind hackforla:gh-pages". - #### Incorporating changes into your topic branch + #### Incorporating changes into your topic branch - To incorporate these updates from the main GitHub repository into your - topic branch, you can 'rebase' your branch onto your updated gh-pages - branch. NOTE you should only rebase if you have never pushed your - topic branch to GitHub (or shared it with another collaborator). + To incorporate these updates from the main GitHub repository into your + topic branch, you can 'rebase' your branch onto your updated gh-pages + branch. NOTE you should only rebase if you have never pushed your + topic branch to GitHub (or shared it with another collaborator). - ```bash - git checkout fix-logo-width-311 - git rebase gh-pages - ``` + ```bash + git checkout fix-logo-width-311 + git rebase gh-pages + ``` - If you receive warnings about conflicts, abort the rebase with `git - rebase --abort` and instead merge gh-pages into your branch. + If you receive warnings about conflicts, abort the rebase with `git + rebase --abort` and instead merge gh-pages into your branch. - ```bash - git checkout fix-logo-width-311 - git merge gh-pages - ``` - + ```bash + git checkout fix-logo-width-311 + git merge gh-pages + ``` ## Making a pull request @@ -444,5 +448,5 @@ If you find an error in your code or your reviewer asks you to make a change, pl -

πŸŽ‰πŸŽ‰πŸŽ‰Congratulations! You have successfully made a pull request. Thank you for contributing !πŸŽ‰πŸŽ‰πŸŽ‰


+

πŸŽ‰πŸŽ‰πŸŽ‰Congratulations! You have successfully made a pull request. Thank you for contributing!πŸŽ‰πŸŽ‰πŸŽ‰


From 5ee907b1602d1498b98a8cda4c5742167837c8d4 Mon Sep 17 00:00:00 2001 From: averdin2 Date: Sun, 23 May 2021 12:11:02 -0700 Subject: [PATCH 13/15] Added hfla-site slack link --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 08e3982e43..49a3ca57b1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ The following is a set of guidelines for contributing to the website repository, ** If you need a text editor to work on code, [VS Code](https://code.visualstudio.com/download) is recommended by the team, but feel free to use a text editor of your choice. -** If you have any other questions about your contributing process, feel free to reach out to the team in the #hfla-site slack channel. +** If you have any other questions about your contributing process, feel free to reach out to the team in the [#hfla-site](https://hackforla.slack.com/archives/C4UM52W93) slack channel.

From b468da6c9208f14e71c9549e4f0452932af98a55 Mon Sep 17 00:00:00 2001 From: Josh Bubar <53061723+jbubar@users.noreply.github.com> Date: Sun, 13 Jun 2021 10:00:27 -0700 Subject: [PATCH 14/15] Made changes suggested by alyssa --- CONTRIBUTING.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 62fc51b2ab..a629a2b0b5 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -356,7 +356,7 @@ get out of sync with this (upstream) repository from time to time. (That's what 5. ### Incorporating changes from upstream Your fork of this repository on GitHub, and your local clone of that fork, will - get out of sync with this (upstream) repository from time to time. (That's what has happend when you see something like "This branch is 1 commit behind hackforla:gh-pages" on the github website version of your hackforla repository.) + get out of sync with this (upstream) repository from time to time. (That's what has happened when you see something like "This branch is 1 commit behind hackforla:gh-pages" on the github website version of your hackforla repository.) One way to keep your fork up to date with this repository is to follow these instruction: [Syncing your fork to the original repository via the browser](https://github.com/KirstieJane/STEMMRoleModels/wiki/Syncing-your-fork-to-the-original-repository-via-the-browser) @@ -434,9 +434,19 @@ your pull request is accepted and merged. Once you have finished working on the issue you have chosen, commit the changes to your local branch (e.g. `fix-logo-width-311`). -

NOTE: After you completed your assignment and committed all of the changes, before moving onto your next issue and creating a new branch, you must leave your current branch and return to the `gh-pages` branch. From there you can checkout into a new branch. (This ensures you don’t accidentally include the changes from your previous branch in your new branch).

+

NOTE: After completing your assignment and committing all of the changes, you must leave your current branch and return to the `gh-pages` branch. -Run `git checkout gh-pages` to return to the `gh-pages` branch: +Run the following command to return to the `gh-pages` branch: + +```bash +git checkout `gh-pages` +``` +Once your pull request is merged you can delete your branch with the following command: + +```bash +git branch -d fix-logo-width-311 +``` +Now you can move on to your next issue and create a new branch. (This ensures you don’t accidentally include the changes from your previous branch in your new branch)

From here, once your pull request is approved and merged you can pull the recent merge from the Hack For LA repository and delete your local branch: ```bash From 6f2015b8869ec00750a6a256b1a030afdc0dd1d0 Mon Sep 17 00:00:00 2001 From: Alyssa <38295612+alyssabenipayo@users.noreply.github.com> Date: Fri, 18 Jun 2021 18:37:02 -0700 Subject: [PATCH 15/15] Update CONTRIBUTING.md Minor changes. Made two changes to the file. --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5bd1db5518..1a28ab9240 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -274,9 +274,9 @@ Create a new branch for each issue you work on. Doing all your work on topic bra git add β€œfilename.ext” ``` - - Use the `git status` command to see what files are staged + - Use the `git status` command to see what files are staged. - This command will list the files that have been staged. These are the files that will be committed (saved) when you run the next command, `git commit`. Please be sure all your staged changes are relevant to the issue you are working on. If you find you have included unrelated changes, please unstage them before making this commit - and then make a new commit for the unrelated changes. (The commands for unstaging commits are provided in the output of your `git status` command.) + This command will list the files that have been staged. These are the files that will be committed (saved) when you run the next command, `git commit`. Please be sure all your staged changes are relevant to the issue you are working on. If you accidentally included unrelated changes, please unstage them before making this commit, and then make a new commit for the unrelated changes. (The commands for unstaging commits are provided in the output of your `git status` command.) ```bash git status @@ -467,4 +467,4 @@ If you find an error in your code or your reviewer asks you to make a change, pl For new volunteers, check this [Wiki](https://github.com/hackforla/website/wiki/How-to-Review-Pull-Requests) for more ways to contribute to the project. -[Back to Top](#overview) \ No newline at end of file +[Back to Top](#overview)