Suppose you are working in a team of having 2 members, you got the assignment to write the following program
Problem 1 : Check whether a number is Prime or not
Member 1
will create a repository named git_practice_assignmnet
and add Member 2
as Collaborator.Member 1
will work on Prime Problem [ will intentionally write the incorrect code ].Member 1
asked for help from Member 2
.Member 2
cloned the repository to the local system.Member 2
will create a new branch named m2_code_fix
and Member 2
will checkout to newly created branch.Member 1
will also create a new branch (wanted to make changes himself/herself)named m1_code_fix
and Member 1
will checkout to newly created branch.Member 1
& Member 2
will work on the program to fix it. After fixing, Member 1
will push the code to the new branch m1_code_fix
, raise a PR and merge it to the main.Member 2
will push the code to the new branch m2_code_fix
, raise a PR. (Now there will be conflicts).Member 1
& Member 2
will connect together and resolve the conflicts then merge the PR to the main.Note :