Git Force Push Branch

I had a problem where I want to push my branch and overwrite what was the on the server.

I kept receiving an error telling me to merge. I did not want to merge and found a way to force push a branch.

In general you don’t want to do this unless you absolutely have to.

git push -f origin <branch>

This Stackoverflow question and answers helped me.

http://stackoverflow.com/questions/10298291/cannot-push-to-github-keeps-saying-need-merge

Share this Story
Load More Related Articles
Load More By Nick Escobedo
Load More In How-To's

Check Also

Selecting Your Next App Dependency

We often turn to open source or proprietary packages for adding functionality to our apps. Here are some key points and questions to ask when selecting your next dependency.