I am working on a project using git where I've been assigned two tasks. Let's assume task A and task B.
I started by forking the project and created a branch named A at this point I was not aware I had to do task B. After forking the project I've cloned the project to my local pc.
Next I ran following command:
git checkout -b A -- created branch A
I made changes to project as per the requirement then I did the following
git add *
git commit -m "message"
git push origin A
Now I was assigned task B for which I created the branch named B.
git checkout -b B
Made changes as per the requirements and committed those changes to branch B.
Now the issue is Branch B contains changes also made in A, instead it should follow the main branch plus changes required as per task B. How can I fix this issue? Branch B should follow main branch and changes as per task B on branch B.
I tried git checkout main but no such branch exist.