I have a branch. My local branch has 5 (m) commits which I have not pushed to remote. The same branch is 7 (n) commit ahead of me. Now what I want to do is remove my 5 (m) unnecessary commits and become same as what remote branch is.
What I tried so far : 1) I went to specific commit where I and remote were same. 2) then I pulled from remote branch. 3) Now I and remote branch are same. 4) Now branch is called (HEAD detached from xxxxf)
How can I make (HEAD detached from xxxxf) branch the same as remote branch?