A JavaFX application for the Resident ID Issuing System (RIIS) for the Kebeles of Bahir Dar City Administration.
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
When contributing to this repository, please first follow the Steps to Contribute and the Code of Conduct before contributing to this project.
Check The basic path of your contribution to get a basic idea of the contribution process.
- Fork the repository from the RIIS repository to your account.
- Clone the repository to your local machine.
git clone <your-forked-repository-link>
- Create a new branch from the remote
dev
branch.
git checkout -b <your_name + dev> origin/dev
- Make your changes to the code base.
- Commit and push your changes to your forked repository to the branch you created.
git push --set-upstream origin dev # For the first time only
git push origin HEAD:dev # For always
- Create a pull request from your forked repository to the
dev
branch of the RIIS repository. - Wait for the pull request to be reviewed and merged.
- Use self-explanatory variable names, function names, and class names.
- Use comments to explain complex code.
- Use descriptive commit messages.
- Use descriptive pull request titles and descriptions.
-
Pulling changes from the original (organization) repository to your forked repository:
- Add the original repository as an upstream to your local repository.
git remote add upstream https://github.com/Lit-coders/RIIS.git
This is done only once.
- First make sure you stash or commit your changes before pulling from the original repository because you might lose your changes or you have to be in a stable state to pull from the original repository.
git stash // or git commit -m "commit message" # to stash or commit your changes
- Pull the changes from the original repository to your local repository main branch.
git pull upstream main
- Push the changes from your local repository to your forked repository main branch.
git push origin HEAD:main
This is because when you pull from the original repo it doesn't update your forked repo but only your local repo. This is the only time you will push to the `main` branch of your forked repository. ( The rules of git flow are not followed here.)
- Update the branch you created with the
main
branch because themain
branch of your local repository is now updated with the latest changes from the original repository.
git checkout <your_branch> git merge main
- Write commit messages for the merge.
git commit -m "Merge latest changes from main into <your_branch>"
- Push the changes from your local repository to your forked repository because the branch you created is now updated with the latest changes from the original repository and now you have to update your forked repository with the latest changes from your local repository.
git push origin HEAD:dev
This is because when you pull from the original repo it doesn't update your forked repo but only your local repo
-
Pushing changes from your local repository to your forked repository after making changes:
git push origin HEAD:dev
-
If you are contributing a new page:
- Create a new fxml file in the
src/main/resources/fxml
directory. - Create a new css file in the
src/main/resources/css
directory. (It is recommended to name the css file asfxml_file_name + .css
) - Create a new controller class in the
src/main/java/com/riis/Controller
directory.(It is recommended to name the controller class asfxml_file_name + Controller
) - make the controller class implement the controller interface. (Check the
src/main/java/com/riis/Controller/Controller.java
file for the interface) - If there is an asset like images to be used in the page, add it to the
src/main/resources/images
directory.
- Create a new fxml file in the
-
To be continued . . .
- You forked the repository to your account.
- You cloned the repository to your local machine.
- You created a new branch from the remote
dev
branch. - You switch to the branch you created.
- You made your changes to the code base.
- You committed and pushed your changes to your forked repository to the branch you created.
- You created a pull request from your forked repository to the
dev
branch of the original repository. - You waited for the pull request to be reviewed and merged.
- You pulled the changes from the original repository to your local repository
main
branch. - You made the branch you created up-to-date with the
main
branch. - You push both the
main
branch and the branch you created to your forked repository.- This is because when you pull from the original repo it doesn't update your forked repo but only your local repo
- Make another change . . .
- Remember you will have 2 branches in your local repository. The
main
branch and the branch you created. - Always push with the branch you created and pull with the
main
branch. - Always make sure the branch you created is up-to-date with the
main
branch. - Always make sure the
main
branch is up-to-date with themain
branch of the original repository.