Skip to content

Contributing

AYAN BISWAS edited this page Feb 22, 2021 · 8 revisions

Contributing Guide

If you are first time visiting this repo please Read this document carefully and please complete the Onboarding Process and if you want to start working please comment on the issue firsth and wait to be get assigned and setup the project locally and read the Commit Message Styling guide and if you are a maintainer please Read Maintainer Guide

To start contributing follow the instructions properly

Fork the repository

Note: This is only needed if you want to contribute to the project.

If you want to contribute to the project you will have to create your own copy of the project on GitHub. You can do this by clicking the Fork button that can be found on the top right corner of the landing page of the repository.

Clone

Note: For this you need to install git on your machine. You can download the git tool from here.

  • If you have forked the project, run the following command -

    git clone https://github.com/YOUR_GITHUB_USER_NAME/gssoc2021-HotelOnTouch

    where YOUR_GITHUB_USER_NAME is your GitHub handle.

  • If you haven't forked the project, run the following command -

    git clone https://github.com/ayan-biswas0412/gssoc2021-HotelOnTouch

  • Now after you cloned the repository, get into the gssoc2021-HotelOnTouch directory by -

    cd gssoc2021-HotelOnTouch

  • Refer to the Local Setup section of this wiki to setup the various modules properly

Remote

Note: This is only needed if you want to contribute to the project.

When a repository is cloned, it has a default remote named origin that points to your fork on GitHub, not the original repository it was forked from. To keep track of the original repository, you should add another remote named upstream. For this project it can be done by running the following command -

git remote add upstream https://github.com/ayan-biswas0412/gssoc2021-HotelOnTouch

You can check that the previous command worked by running git remote -v. You should see the following output:

$ git remote -v
origin https://github.com/YOUR_GITHUB_USER_NAME/gssoc2021-HotelOnTouch (fetch)
origin https://github.com/YOUR_GITHUB_USER_NAME/gssoc2021-HotelOnTouch (push)
upstream https://github.com/ayan-biswas0412/gssoc2021-HotelOnTouch (fetch)
upstream https://github.com/ayan-biswas0412/gssoc2021-HotelOnTouch (push)

Working on an Issue

Now that you have setup the project, you need to search for anything to work on which interests you. Have a look at the Issues whichever interests you.

  • Once you find an unassigned issue that you wish to solve, comment below the issue asking whether you should work on it or not.
  • Wait for a Mentor/Admin to assign it to you and start working on it.

Making a Pull Request

After working on an issue, adding relevant documentation and tests, you need to push your changes to your forked repository and make a pull request. You should always push your changes in a different branch (not master).

git checkout -b <new-branch-name>

Make the relevant changes and then commit with a proper message:

git add -a
git commit -m "<your-commit-message-here>"

Now push the changes:

git push origin <new-branch-name>

Now in the GitHub repo click on New Pull Request

Note: For more detailed understanding visit this page.

Congratulations! You have contributed to HotelOnTouch successfully.