Possible Duplicates:
How do I push amended commit to the remote git repo?
Undoing a git push
Hi,
I've deleted some commits from my master branch by using
git reset --hard SHA_VALUE
I have, however a remote version of the repository on github, and whenever I git push
things, I get an error message, that I should merge the changes contained in the remote repository (which I do not want to).
So my question is, what is the remote equivalent to the git reset
command?
thx
You can use "git push" with "force" option
git push -f
via manpages:
-f, --force Usually, the command refuses to update a remote ref that is not an ancestor of the local ref used to overwrite it. This flag disables the check. This can cause the remote repository to lose commits; use it with care.
I think you need to do a "git rebase". Check this article on rebasing and read the section titled "Common Rebasing Use Practices".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With