We invite you to join our team! Everyone is welcome to contribute code via pull requests, to file issues on GitHub.
You can get your own fork/copy of this project by using the Fork button.
You need to clone (download) it to local machine using
$ git clone https://github.com/<YOUR_USERNAME>/Companion-App.git
Once you have cloned the repository, move to that folder first using cd
command.
$ cd Companion-App
Move to this folder for all other commands.
Run the following commands to see that your local copy has a reference to your forked remote repository in Github
$ git remote -v
origin https://github.com/<YOUR_USERNAME>/Companion-App.git (fetch)
origin https://github.com/<YOUR_USERNAME>/Companion-App.git (push)
Now, lets add a reference to the original Companion-App repository using
$ git remote add upstream https://github.com/GfG-JSSATEB/Companion-App.git
This adds a new remote named upstream.
Verify the changes using
$ git remote -v
origin https://github.com/<YOUR_USERNAME>/Companion-App.git (fetch)
origin https://github.com/<YOUR_USERNAME>/Companion-App.git (push)
upstream https://github.com/GfG-JSSATEB/Companion-App.git (fetch)
upstream https://github.com/GfG-JSSATEB/Companion-App.git (push)
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 `Companion-App` repo
$ git push origin
Once you have completed these steps, you are ready to start contributing or raise Issues and creating pull requests.
Make sure you have following installed on your machine:
To setup Flutter in Android Studio check here
To setup Flutter in VSCode check here
- Install flutter dependencies using:
$ flutter pub get
-
Setup Firebase(Only Android for now): For more details check here
-
Install firebase tools:
$ npm install -g firebase-tools
- Install cloud function's dependencies using:
$ cd functions
$ npm install
$ cd ..
Run the app using:
$ flutter run
Upload firebase functions:
$ firebase deploy --only functions
Whenever you are going to make contribution. Please create separate 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 separate branch for contribution 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 code 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
.
Make sure you make Pull Request from your branch to the development
branch of our project
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.