The issue is that a team member had by mistake created a separate branch (main branch being master) called "Head". "Head" has the latest code which i now want to over-write to the master (since it is up-to-date with all the code).
When i try to perform "Merge Head into master" i get an error saying "unrelated branches". I searched on so and found out that i would need to pull the branch ("Head") locally and then push (or force-push) it to the remote "master" branch to merge the code.
I used the following command:
git fetch && git checkout Head
and checked it out (cloned it) to local. Now when i try to push it shows that i am 17 commits behind and 3 changes to push.
How do force merge everything i have locally into the remote master ?
Thanks
EDIT
I did what das-g told but it seems that the only change i see in remote is that the Head
branch is deleted. The code changes which were originally there in Head
has vanished (or lost!!!). I can see the tags and history but it seems the changes are deleted forever!!!
Screenshot: