Skip to content

Latest commit

 

History

History
144 lines (94 loc) · 7.67 KB

CONTRIBUTING.md

File metadata and controls

144 lines (94 loc) · 7.67 KB

freeCodeCamp forum clone's contributing guide

Table of Contents

Documentation

Please, make sure to read through the following documents:

Issues

Creating issues

Feel free to check out our codebase. If you think, that something could be added, fixed, or improved on, first check that there is no open issue for that by looking through the issues tab.

If you are confident, that your issue won't be a duplicate - go ahead and create it!

If you have some ideas about possible changes, please share your thoughts by creating a new thread in the discussions.

Picking up an issue to work on

Browse through the open issues and feel free to start working one that does not have an assignee yet.

If you are a collaborator, assign yourself to the issue you want to work on.

If you are not a collaborator, please leave a comment in the issue thread so we know that you are working on it.

In any case - make sure to use the issue thread to ask questions about the issue if you need!

Making changes

If you are experienced with Git workflow, please read through the How to contribute section of our README.

If you are new to Git and GitHub, please read the following sections below on how to get started.

Installing git

If you don't have Git installed on your machine, install it. If you are not sure if it is installed, please use the git --version command in the command line.

Forking the repo

Fork this repository by clicking on the fork button on the top of this page. This will create a copy of this repository in your account.

Creating a local copy of the repo (aka cloning)

Now clone the forked repository to your machine. Go to your GitHub account, open the forked repository, click on the code button and then click the copy to clipboard icon.

Open a terminal and run the following git command:

git clone url-you-just-copied

where url-you-just-copied is the url to this repository (your fork of this project).

Installing dependencies

If you don't have Node.js installed on your computer, please read through these instructions. If you are not sure if Node.js is installed, please run the node -v command in the command line.

Then change to the project directory by using the cd fcc-forum-clone command. To install the dependencies, run the npm install command.

Creating a new branch to start working on the issue

Change to the FCC forum clone directory on your computer (if you are not already there):

cd fcc-forum-clone

We have already deployed our version 1 of the application and the main branch is meant for the production code, in other words, it should not be modified directly. Branch called v1 is our current working branch used to develop features for version 2. Therefore, you need to first change to this v1 branch by git checkout v1.

Pick an issue to work on.

Now you need to create a new branch for the changes you plan to implement to solve the issue. To create a branch and switch to that new branch, use the git checkout command. We follow simple naming convention to name your branch. One way to name a branch would be: <number-of-issue>-<type-of-changes>-<what-the-issue-is-about> So when you pick issue number #42 with title "Add sorting mechanism to the user list", your new branch's name should look like #42-user-list-sorting or similar.

git checkout -b your-new-branch-name

Committing changes and pushing them

Commit the changes once you are happy with them. If you go to the project directory and execute the command git status, you'll see there are changes. Add those changes to the branch you just created using the git add command:

git add changed-file-name

Now commit those changes to your local branch using the git commit command. Try to make the commit message descriptive, but not super verbose!

git commit -m "commit message"

Push your local branch and create a remote branch on GitHub using the command git push :

git push -u origin branch-name

Pull Request

When you're finished with the changes, create a pull request, also known as a PR.

  • Please follow all instructions in the template so that we can review your PR.
  • Don't forget to link PR to issue if you are solving one.
  • Enable the checkbox to allow maintainer edits so the branch can be updated for a merge. Once you submit your PR, a team member will review your proposal. We may ask questions or request for additional information.
  • We may ask for changes to be made before a PR can be merged, either using suggested changes or pull request comments. You can make any other changes in your fork, then commit them to your branch.
  • As you update your PR and apply changes, mark each conversation as resolved.
  • If you run into any merge issues, checkout this git tutorial to help you resolve merge conflicts and other issues.

Still a little bit lost?

  • Check out this video from freeCodeCamp's YouTube channel on Git and GitHub basics.
  • Don't be shy to ask us about anything related to the project and working on it. Depending on your question, use pull request threads, issue threads or the discussions.