-
-
Notifications
You must be signed in to change notification settings - Fork 777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate contributing content and the readme #962
Comments
This comment has been minimized.
This comment has been minimized.
Progress: Have collected some examples of dividing contributing content and README. |
Haven't heard back yet, so I'll check in at the Sunday meeting to see if I can get some guidelines. For now I've divided most of the README content onto a CONTRIBUTING .md file akin to what is seen in Civic Tech Index on local repo. Will open pull req if I get the greenlight. |
@matthewlee626 Can you please add the labels for status? |
Notes from meeting
|
README.md WebsiteHack for LA's website: https://www.hackforla.org Please refer to the wiki to learn more about the following areas.
This is a standard Jekyll site hosted right here on GitHub pages. ContributingOnce you have gone through onboarding, go to the WIKI. For developers looking for the standard README, see the CONTRIBUTING document for more details on how to get started. Also see our Code of Conduct and License documents. |
CONTRIBUTING.md How to ContributeTo develop the site, you'll need to first clone the repository on to your computer. For new Git users, see the Using Git section below. OVERVIEWSet up Before you start working on an issue After you've worked on your issue and before you make a pull request: Or
Okay. You're good to go! Forking and cloning the repository with proper securityStep 1: Become a member of the repository TeamIn the Once you have accepted the GitHub invite (comes via email or in your GitHub notifications), please do the following:
Using GitThis section discusses some tips and best practices for working with Git. Making changes, committing and pushing
Step 2: Fork the repositoryIn https://github.com/hackforla/website, look for the fork icon in the top right. Click it and create a fork of the repository. 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 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 computerFor git beginners, this process will create a third copy of the repository on your local desktop. First create a new folder on your desktop that will contain In your shell, navigate there then run the following commands: git clone https://github.com/your_GitHub_user_name/website.git You should now have a new folder in your cd website Next, verify that your local cloned repository is pointing to the correct git remote -v You should see 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 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 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), then you can correct that with the following two commands:
git remote set-url origin https://github.com/your_user_name/website.git
git remote add upstream https://github.com/hackforla/website.git Step 4: Setting up DockerDocker 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). There are two pre-requisites: Docker and Docker Compose. More on using Docker and the concepts of containerization: Ensure you run the 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: Build and serve the website locallyThis command starts a jekyll server locally. The server watches for changes to docker-compose up Now browse to http://localhost:4000 Tear downTo stop and completely remove the jekyll server (i.e. the running Docker container): (do this anytime Docker or jekyll configuration or other repository settings change) docker-compose down To stop the server, but not destroy it (often sufficient for day-to-day work): docker-compose stop Bring the same server back up later with: docker-compose up Step 5: Read Hack for LA's Site Architecture to get acquainted with how the website is structuredStep 6: Work on an issue using gitCreate a new branch for each issue you work on. Doing all your work on topic branches leaves your repository's main branch (named a) Check current branch The git branch You will see a list of all of your branches. There will be a star ( Note: when you work on future issues, you must always be in the If you are not currently in the git checkout gh-pages b) Create a new branch where you will work on your issue The To create a new issue branch, and switch into it: git checkout -b fix-logo-width-311 The text after the 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. When you've finished working on your issue, follow the steps below to prepare your changes to push to your repository. c) Prepare your changes to push to your repository 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. -Use the Run the command: git add . -Use the 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 status -Use the This command saves your work, and prepares it to push to your repository. Use the To commit your changes with a message, run: git commit -m “insert message here” Congratulations! You are now ready to push your work to your repository. Step 7: Check upstream before you pushBefore 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 upstream Step 7a: No changes in the upstream repositoryIf you do not see any output, there have not been any changes in the If you just type git push --set-upstream origin fix-logo-width-311 Step 7b: conflicting changes in the upstream repositoryWhen you check the upstream repository, you may see output like this: 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 You can safely ignore changes in other issue branches, such as Incorporating changes from upstreamYour fork of this repository on GitHub, and your local clone of that fork, will One way to keep your fork up to date with this repository is to follow You can also update your fork via the local clone of your fork, using 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: 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: 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 gn-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: 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 branchTo incorporate these updates from the main GitHub repository into your git checkout fix-logo-width-311
git rebase gh-pages If you receive warnings about conflicts, abort the rebase with git checkout fix-logo-width-311
git merge gh-pages Step 8: Status UpdatesIf 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.
Step 9: Complete the pull requestgit push --set-upstream origin fix-logo-width-311 Now create a new pull request to ask for your updates to be Once you have finished working on the issue you have chosen, commit 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 Run the following command to return to the git checkout gh-pages 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: git pull upstream gh-pages
git branch -d <your-feature-branch> 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 requestIf 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 LinksSupported PlatformsTutorials |
@daniellex0 Let me know if these .md files look good! |
This issue should be good. |
Overview
We need to separate contributing content and the readme so the instructions are more clear.
Action Items
Resources/Instructions
The text was updated successfully, but these errors were encountered: