Cloning the Repository: Each collaborator will have their own local
system copy of the project repository.
git clone [repo-url]
Pull Latest Changes: Before starting work or making any changes, pull the
latest changes from the remote repository to ensure you have the most up-to-date version of
the code.
git pull origin [main]
This command fetches changes from the remote repository (named origin) and merges them into
the local
branch [main].
Creating a Branch: Create a new branch to work on a specific feature or
task. This helps keep the main branch clean and allows for parallel development.
git checkout -b [feature-branch-name]
Making Changes and Commits: Make changes to the codebase on your local
branch. Then stage and commit those changes with descriptive commit messages.
git add.
git commit -m "brief description of changes"
Pushing Changes to GitHub: After committing changes to your local branch,
push those change to the remote repository on GitHub.
git push origin [feature-branch-name]
Create Pull Request: After pushing changes to GitHub, you can create a
pull request (PR) from your branch into the main branch. This allows other group members to
review the changes before merging.
Review and Merge Pull Requests: Those assigned to review pull requests
should do so and can leave comments and suggest changes if needed. Once the changes are
approved, the pull request can be merged into the main branch.