I am new to git, I have a use case, where I have raised the new commit and send it to code review, but then I realise my local mainline branch is not to the latest commit, someOne in my team had push the new commit to the remote mainline branch.
Let see the scanriao:
A--> B--> C <-- my local latest commit at C.
But My team raise the new commit and merged it to remote branch.Let say it is commit D.
So What I wanted to acheive is given below:
A-->B-->D--->C
HoW I can acheived above digram change. Like pull the latest changes from mainline(i.e D) and then push my changes(i.e C) as a latest commit over it.
Thanks.