Saving Trees, Saving Lives.
This project is build with following languages and framework
This is an example of how you may give instructions on setting up your project locally. To get a local copy up and running follow these simple example steps.
- Text editor (Vscode, Sublime text, Notepad++ or any)
-
Clone the repository
-
Open a terminal, navigate to Root directory .
cd osm
- Build npm dependencies
npm i
- Copy environment variables examples from
env.example
or Create .env file in root directory and paste
MONGO_CONNECT=mongodb://localhost:27017/userDB
- Run with node or nodemon
npm start
npm run dev
All your plants in map view
This document describes the workflow for submissions or contributions for osm
Note : While working with github from the command line it is best to setup SSH Keys (this will save you a lot of hassle).
-
Fork the repo on GitHub to your personal account. Click the
Fork
button on the page. (this needs to be done only once.) -
Clone the repository. Click the green "Clone or download" button ①, and copy the repository's URL ② and
type
git clone repo-url
in terminal
Before you make any changes, you should make a branch. Remember to never commit to main. The command git status
will tell you what branch you are on. Customizing your terminal to show your git branch makes it easier to keep track of branch.
- Update main. Before you make any changes, first checkout main
git checkout main
and pull latest changes
git pull
-
If it is the first time Create a new branch, or switch to your branch. After cloning the repository, create a new branch. We will follow a structure in which each contributor contributes to his/her own branch. For example I will create a branch named
feature
- You can create a new branch as,
git checkout -b <branch-name> git checkout -b frontend
- If the branch exists
git checkout <branch-name>
-
Make your changes and commit them. Once you have created your branch, make your changes and commit them. Remember to keep your commits atomic, that is, each commit should represent a single unit of change. Also, remember to write helpful commit messages, so that someone can understand what the commit does just from reading the message without having to read the diff.
For example, at the command line, this might look like
git add filename [filename ...]
git commit -m "descriptive message of what you did"
- Push up your changes. Push your changes to your fork. Do this by running
git push origin branch-name
-
Make a pull request. If you then go to your fork on GitHub, you should see a button to create a pull request from your branch.
-
Once doing this, you will be presented with a page. This page will show you the diff of the changes. Double check them to make sure you are making a pull request against the right branch.
- Enter a descriptive title in the title field. This is very important, as it is what will show up in the pull request listing and in email notifications to the people in the repo. Pull requests with undescriptive titles are more likely to be passed by.
-
Pushing additional changes. Once you have created the pull request, it will likely be reviewed and some additional fixes will be necessary. Do not create a new pull request. Rather, simply make more commits to your branch and push them up as in steps 3 and 4. They will be added to the pull request automatically.
Once the pull request has been reviewed successfully, someone with push access to the main repository will merge it in.