git reset /delete remote respository commit
2013-07-09 23:15
471 查看
git reset --soft HEAD^ 撤销上一次提交,修改的文件还在git reset --hard HEAD^ 撤销上一次提交,修改的文件被还原delete commit alread push to remote respository:First, remove the commit on your local repository. You can do this using
git rebase -i. For example, if it's your last commit, you can do
git rebase -i HEAD~2and delete the second line within the editor window that pops up.Then, force push to GitHub by using
git push origin +master
or:git push -f origin <branch-name>delete middle commit like this:git rebase --onto <remove-commit-sha> <branch-name>
相关文章推荐
- git版本回退 How do I use 'git reset --hard HEAD' to revert to a previous commit?
- Git- [!remote rejected]:refusing to delete the current branch
- git push and delete remote branches
- Git Delete Last Commit
- git add后 未commit git reset --hard如何恢复
- git中各个commit节点的查询 回溯 与 合并:git rebase与git reset
- Git: How to revert a merge commit that's already pushed to remote branch?
- Git: Delete a branch (local or remote)
- 修改git commit 除了 git commit --amend 还有 git commmit rebase, reset, .
- 修改git commit 除了 git commit --amend 还有 git commmit rebase, reset
- 【git使用】Permission denied (publickey). fatal: Could not read from remote respository.解决办法
- 修改git commit 除了 git commit --amend 还有 git commmit rebase, reset,
- git相关-- git命令 及 git add后 未commit git reset --hard如何恢复
- 使用git reset之后,如何恢复删除掉的commit
- How to delete the remote branch in git
- git撤销commit,错误reset后恢复本地代码;git忽略已经被纳入版本管理的文件
- 恢复git reset后的commit
- 修改git commit 除了 git commit --amend 还有 git commmit rebase, reset,
- Delete multiple git remote branches by prefixing colon
- Git版本控制:利用git reset恢复档案,暂寸状态,commit讯息