- Fork this repository.
a. Click on Fork.
b. Click on Create fork.
c. Click on Code.
d. Copy the URL. Use this URL in the next step.
-
Clone the forked repository, using following command
git clone https://github.com/<your_username>/examania.git
-
Navigate to the repository's directory:
cd C:/path_to_directory/examania
-
Ensure you are on the branch you want to use as the base branch:
git checkout main
-
Create a new branch for each pull request:
git branch new-branch-name
-
Switch to Newly created branch.
git checkout -b new-branch-name
-
In new terminal type
cd backend npm install npm run dev
This will start the backend server.
-
Open another new terminal and type
cd frontend npm install npm start
This will start the frontend server.
-
Make required changes in source code.
-
Stage your changes:
Check status,you should be able to see modified files in red color.
git status
git add <filename1> <filename2> <filename3>
or if you want to stage all changes
git add .
Check status, now you should be able to see staged files in green color.
git status
- Commit your staged changes using:
git commit -m "Your commit message here"
Replace "Your commit message here" with a descriptive message that summarizes the changes you made. Check this Conventional Commit Messages.
- Ensure you have correct origin(forked repo) and upstream(original repo):
git remote -v
- Push the new branch to the remote repository:
git push origin new-branch-name
This command pushes the new branch to the remote repository, making it available for others to see and review.
-
Create a Pull Request(PR): On GitHub website navigate to the original repository and locate the "New Pull Request" button.
-
If you want to make any changes after creating a PR in the same branch, Repeat steps 9 to 13.
In our project, we follow the convention of using conventional commit messages for all commits. Conventional commit messages provide a standardized format for commit messages, making it easier to understand and track changes in our codebase.
A conventional commit message consists of a concise and structured format:
git commit -m "<type>(optional_scope): <your_commit_message>"
The message includes a type and a description, separated by a colon. Here's a breakdown of each component:
Type: The type indicates the nature of the commit and should be selected from a predefined set of types that are relevant to the changes made. Some common types include:
- feat: for a new feature implementation.
- fix: for a bug fix.
- docs: for documentation changes.
- chore: for maintenance or general housekeeping tasks.
- test: for adding or modifying tests.
- refactor: for code refactoring without changing functionality.
- style: for code style changes (e.g., formatting, indentation).
Description: The description provides a brief summary of the changes made in the commit. It should be concise but descriptive enough to understand the purpose of the commit.
Examples:-
git commit -m "feat(backend): Add search feature"