I am working in a local branch named 'fixes', I made a push so I have some changes on remote, then I realised that sth was missing on the code, made changes and pushed them, surprise when I realised that the remote had work that I did not, so I tried
git pull origin fixes
git push
then I solved one conflict and tried to push again, but the issue still happening.
at this point I want to force push my local changes into the remote overwriting them, I have been checking around for the force push command but I am a bit scared of messing things around.
what would be the correct git force push command for my situation (overwritting the remote)
CodePudding user response:
This will work -
git push -f <remote> <branch>
CodePudding user response:
If you want a detailed explanation, I found this existing answer -
Force "git push" to overwrite remote files
Do check it out, it will clear all your doubts!
CodePudding user response:
Here is your answer :
git push -f