Algorithms

What you can do with this repo ?

You can add a new folder for your favourite programming (if not already present) language and start adding algorithms to the folder.

Steps to contribute

  1. Click on the fork button on the top right corner of this page.
  2. Now go to http://github.com/{your_username}/Algorithms where you can see your own fork of this repo.
  3. Open the terminal and clone your fork using
git clone http://github.com/{your_username}/Algorithms
  1. Now go inside the directory "Algorithms" and checkout to a new branch with name of your choice
git checkout -b {branch_name}
  1. Start adding/modifying your algorithms.
  2. Add the files you want to commit to the staging area.
git add {folder_name/file_name}
  1. Commit the changes
git commit -m '{Your commit message}'
  1. Push to GitHub.
git push origin {branch_name}
  1. Go to http://github.com/{your_username}/Algorithms , on the left there is a button to change your branch. Click on it and select {branch_name}.
  2. Now you will be able see a button named "Pull request". Click on it.
  3. Add appropriate message and click the "Create Pull Request" button.

Resolving errors

  1. If you get a message like "This branch is X commits ahead, Y commits behind" then visit this thread and follow the steps. Also don't forget to push and pull from proper branches (observe that we have a main branch instead of master).
  2. In case of merge conflict visit this thread.