This repository is now prepared for team-based practice work.
src/contains the shared Java project code.team/contains one folder for each team member.
Each team member should work inside their own folder for notes, exercises, drafts, screenshots, or planning files. Shared application code should still be updated in src/ only when the team agrees on the change.
team/formabdulmajeed/team/fromabdullahalhadabi/team/fromabdullahhosni/team/fromalharith/team/fromalharithalkindi/team/fromaljolanda/team/fromibrahim/team/fromsaif/team/fromsulaiman/team/fromyarab/
- Pull the latest code before starting work.
- Create or switch to your own branch. Do not work directly on
main. - Do personal notes and temporary files inside your own folder under
team/. - If you change shared code in
src/, keep the change small and clear. - Test your change before committing.
- Commit with a clear message that explains what you changed.
- Push your branch to GitHub.
- Open a pull request from your branch into
main. - Merge into
mainonly after review or team approval.
Example commit messages:
Add input validation in Main.javaUpdate fromibrahim notes for task 1Refactor welcome output in Main.java
- Do not commit files from
.idea/,out/, or*.iml. - Do not edit another member's folder unless the team agreed.
- Keep unrelated changes out of the same commit.
- Pull before push if others are working in the repository.
- No one should push directly to
main. - Every member should push only to their own branch.
- All changes to
mainshould come through a pull request.
Recommended flow:
git pull
git checkout main
git pull
git checkout -b your-branch-name
git status
git add .
git commit -m "Your clear message"
git push -u origin your-branch-nameExample branch names:
formabdulmajeed/task-1fromibrahim/fix-main-outputfromsaif/add-notes
This project should use a branch-based workflow.
mainis the shared stable branch.- Each member creates their own branch from
main. - Each member works only in their own branch.
- Each member pushes their branch to GitHub.
- After finishing work, the member opens a pull request to merge into
main. - No one should commit or push directly to
main.
Simple workflow for each member:
git checkout main
git pull
git checkout -b your-branch-nameMake your changes, then:
git add .
git commit -m "Describe your change"
git push -u origin your-branch-nameAfter pushing:
- Open GitHub.
- Create a pull request from your branch to
main. - Wait for review or team approval.
- Merge only after approval.
The team rule should be:
mainis protected.- No team member pushes directly to
main. - Only reviewed pull requests go into
main.
If you use GitHub, enable branch protection on main so direct pushes are blocked.
- Put production or shared Java code in
src/. - Keep member-specific documents inside
team/<your-name>/. - If two people need the same file in
src/, coordinate before editing it.
- The current project is a simple Java starter in
src/Main.java. - The repository already includes a
.gitignorefor common IDE/build files.