hackforla / incubator

https://github.com/orgs/hackforla/projects/73/views/5
GNU General Public License v2.0
3 stars 14 forks source link

Document the local development workflow in CONTRIBUTING.md - incubator repo #52

Closed robinglov closed 6 months ago

robinglov commented 9 months ago

Overview

As a developer onboarding to the Incubator team, I want documentation on how to download the repository, edit it, and make a PR.

Action Items

Resources/Instructions

robinglov commented 8 months ago

Reference: https://github.com/hackforla/ops/issues/114

How to Contribute to Incubator

ℹ️ This page is under development Below are guidelines for contributing to the incubator repository hosted on GitHub. These guidelines are primarily recommendations rather than strict rules. Use your discretion and feel free to suggest changes to this document by submitting a pull request.

This guide assumes that you have finished the onboarding process, which involves joining the Hack for LA Slack, GitHub, and Google Drive. If you haven't completed onboarding yet, please visit the Getting Started Page.

The team recommends using VS Code as the preferred text editor for working on code, but feel free to utilize a text editor of your preference.

If you have any additional questions about your contribution process, please feel free to reach out to the team in the #incubator Slack channel.

Table of Contents

Setting up the local development environment

Creating a personal AWS account

Back to Table of Contents



Fork the repository

Fork the hackforla/incubator repository by clicking . A fork is a copy of the repository that will be placed on your GitHub account.

Note: It should create a URL that looks like the following -> https://github.com/<your_GitHub_user_name>/incubator.

For example -> https://github.com/octocat/incubator.

Be Aware: What you have created is a forked copy in a remote version on GitHub. It is not yet on your local machine.

Back to Table of Contents


Clone (Create) a copy on your computer

Create a new folder in your computer that will contain hackforla projects.

In your command line interface (Terminal, Git Bash, Powershell), move to where you want your new folder to be placed and create a new folder in your computer that will contain hackforla projects. After that, navigate into the folder(directory) you just created.

For example:

mkdir hackforla
cd hackforla

and run the following commands:

git clone https://github.com/<your_GitHub_user_name>incubator.git

For example if your GitHub username was octocat:

git clone https://github.com/octocat/incubator.git

You should now have a new folder in your hackforla folder called incubator. Verify this by changing into the new directory:

cd incubator

Verify origin remote url

Verify that your local cloned repository is pointing to the correct origin URL (that is, the forked repo on your own Github account):

git remote -v

You should see fetch and push URLs with links to your forked repository under your account (i.e. https://github.com/<your_GitHub_user_name>/incubator.git). You are all set to make working changes to the devops-security on your local machine.

However, we still need a way to keep our local repo up to date with the deployed incubator. 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:

git remote add upstream https://github.com/hackforla/incubator.git
git fetch upstream

After adding the upstream remote, you should now see it if you again run git remote -v :

origin  https://github.com/<your_GitHub_user_name>/incubator.git (fetch)
origin  https://github.com/<your_GitHub_user_name>/incubator.git (push)
upstream        https://github.com/hackforla/incubator.git (fetch)
upstream        https://github.com/hackforla/incubator.git (push)

What if you accidentally cloned using the repository URL from the HackForLA Github (instead of the fork on your Github)?

i. Reset origin remote url

Set your forked repo on your Github as an origin remote:

git remote set-url origin https://github.com/<your_GitHub_user_name>/incubator.git

For example if your GitHub username was octocat:

git remote set-url origin https://github.com/octocat/incubator.git
ii. Add an upstream remote

Add another remote called upstream that points to the hackforla version of the repository. This will allow you to incorporate changes later:

git remote add upstream https://github.com/hackforla/incubator.git

Back to Table of Contents

robinglov commented 8 months ago

The PR failed. Ops is troubleshooting the Github Action failure that occurred due to AWS credentials.

chelseybeck commented 6 months ago

this issue is resolved in: