February 21, 2012 0

Git Correct commit pushed to remote repository

By in GIT

If you have pushed something to a remote repository that should not have been pushed then do the following:

checkout locally the commit that you want to replace the erroneous commit (this should be a commit at an earlier stage than the unwanted one)

git push -f origin master

this will force the remote repository to be at this stage

 


Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/mgis.dk/about/wp-includes/class-wp-comment-query.php on line 399

Leave a Reply