I am trying to make a commit/push to work on team project.
Situation
There is a team project repo at team leader's github. So I forked the team project repo(I am invited in original team repo). Then, I cloned the file to my local and added remote branch called 'pjt' connecting it with my forked repo. I also added new branch for the commit/push to forked repo is 'nb'. I added file using 'git add ', committed it on the 'nb' branch, then pushed using command
git push -u pjt nb
Problem
But this causes error
(forked repo owner name):main and (my ID):nb are entirely different commit histories.
After this happens when I look at my source tree, suddenly the commit history of team project repo appears in my source tree.
How can I make a successful commit/push to my team project repo?