Skip to content

Latest commit

 

History

History
196 lines (134 loc) · 5.77 KB

CONTRIBUTING.md

File metadata and controls

196 lines (134 loc) · 5.77 KB

Contributing

Guidelines

  • Issues will be assigned on a first come, first serve basis. You just have to comment on the issue, asking to be assigned, and it will be done if found fit.
  • Preferably, you cannot work on any issue that is not assigned to you.
  • In case you want to submit an improvement to an existing feature or section, we prefer that you notify us in suggested medium of contact, describing in details your improvement. This will help others to analyze your contribution.
  • All PRs must be made from a Branch. Create a separate branch for every Issue you are working upon and once found fit, make a PR.
  • If you have no idea what are issues or PRs, please do refer to the links.
  • U need to make a branch and submit the pr always. Don't send pull requests to master branch. Create a branch as <GIT_USERNAME>/<ISSUE_NUMBER> and make a request.
  • Issues are of three kinds easy, medium and hard. 5 for easy, 10 for medium and 15 for hard level issues. Participants with high score will be winner Make sure your code works before submitting it :D

Set it up locally

Fork it

You can get your own fork/copy of this project by using the Fork button.

Fork Button

Clone it

You need to clone (download) it to local machine using

$ git clone https://github.com/<YOUR_USERNAME>/Web-Development.git

Once you have cloned the repository, move to that folder first using cd command.

$ cd Web-Development

Move to this folder for all other commands.

Set it up

Run the following commands to see that your local copy has a reference to your forked remote repository in Github :octocat:

$ git remote -v
origin  https://github.com/<YOUR_USERNAME>/Web-Development.git (fetch)
origin  https://github.com/<YOUR_USERNAME>/Web-Development.git (push)

Now, lets add a reference to the original Web-Development repository using

$ git remote add upstream https://github.com/GameofSource-GFG/Web-Development.git

This adds a new remote named upstream.

Verify the changes using

$ git remote -v
origin    https://github.com/<YOUR_USERNAME>/Web-Development.git (fetch)
origin    https://github.com/<YOUR_USERNAME>/Web-Development.git (push)
upstream  https://github.com/GameofSource-GFG/Web-Development.git (fetch)
upstream  https://github.com/GameofSource-GFG/Web-Development.git (push)

Sync it

Always keep your local copy of repository updated with the original repository.

Before making any changes and/or in an appropriate interval, run the following commands carefully to update your local repository.

# Fetch all remote repositories and delete any deleted remote branches
$ git fetch --all --prune

# Switch to `main` branch
$ git checkout main

# Reset local `main` branch to match `upstream` repository's `main` branch
$ git reset --hard upstream/main

# Push changes to your forked `Web-Development` repo
$ git push origin main

You're Ready to Go

Once you have completed these steps, you are ready to start contributing by checking our Issues and creating pull requests.


Installation

Make sure you have following installed on your machine:

Install all dependencies using:

$ npm install
# OR
$ yarn

Move inside the client folder and install the dependencies also using:

$ npm install
# OR
$ yarn

copy the .sample.env file as .env for your local testing

$ cp .sample.env .env

To start your app both server and client use:

$ npm run dev
# OR
$ yarn dev

Create a new branch

Whenever you are going to make contribution. Please create seperate branch using the command and keep your main branch clean and most stable version of your project (i.e. synced with remote branch).

# It will create a new branch with name <YOUR GITHUB USERNAME>/<ISSUE NUMBER> and switch to that branch
$ git checkout -b <YOUR GITHUB USERNAME>/<ISSUE NUMBER>
#Example
#$ git checkout -b monatheoctocat/1

Create a seperate branch for contibution and try to use same name of branch as of your contributing feature associated with your assigned issue.

To switch to desired branch

# To switch from one branch to other
$ git checkout <BRANCH NAME>

To add the changes to the branch. Use

# To add all files to branch <YOUR GITHUB USERNAME>/<ISSUE NUMBER>
$ git add .

Type in a message relevant for the code reveiwer using

# This message get associated with all files you have changed
$ git commit -m 'relevant message'

Now, Push your awesome work to your remote repository using

# To push your work to your remote repository
$ git push -u origin <BRANCH NAME>
#Example
#$ git push -u origin <YOUR GITHUB USERNAME>/<ISSUE NUMBER>

Finally, go to your repository in browser and click on compare and pull requests.

NOTE:

Make sure you make Pull Request from your branch to the development branch of our project

IMAGE

Then add a title and description to your pull request that explains your precious effort. Don't forget to mention the issue number you are working on.

Thank you for your contribution.