Skip to content

Latest commit

 

History

History
43 lines (34 loc) · 1.81 KB

CONTRIBUTING.md

File metadata and controls

43 lines (34 loc) · 1.81 KB

How to Contribute

  • Fork this repository - How to fork a repository
  • Clone the forked repository into local space.
  • Add your info in the addInfo.json file in code folder in the same format.
  • Create a file and add your algorithm code in it and put that file in code folder.
  • Add and commit the changes.
  • Don't forget to add your name, image url and country in contributors table in the README.md file.
  • Generate a Pull Request.
  • That's it, you have successfully completed your first PR.

How to Sync Forked Repo from Upstream Repo

  1. Add the original repository as an upstream repository
$ git remote add upstream https://github.com/[Original Owner Username]/[Original Repository].git
  1. Fetch all the changes from the repository. Note that commits to the original repository will be stored in a local branch called, upstream/master
$ git fetch upstream
  1. Make sure that you are on your fork's master or working branch
$ git checkout [working branch]

For example,

$ git checkout master
  1. Merge the changes from the upstream/master into your local master or working branch. This will sync the fork's master branch with the upstream repository without losing your local changes. If you have made any changes that create conflict, you will have to resolve the conflict before you can complete the merge
$ git merge upstream/master
  1. At this point, your local branch is synced with the upstream/master branch. In order to update the remote branch in Github, you need to push your changes
$ git push origin master