Rewinding remote git branch
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".
链接地址: http://www.djcxy.com/p/48912.html上一篇: 修改推送的提交消息
下一篇: 重新启动远程git分支