移除GitHub上的commit
来源:互联网 发布:sicp python pdf 编辑:程序博客网 时间:2024/04/27 16:41
参看stackoverflow上的回答
http://stackoverflow.com/questions/448919/how-can-i-remove-a-commit-on-github
Note: please see alternative to git rebase -i
in the comments below.
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~2
and delete the second line within the editor window that pops up.
Then, force push to GitHub by using git push origin +master
.
See Git Magic Chapter 5: Lessons of History - And Then Some for more information (i.e. if you want to remove older commits).
Oh, and if your working tree is dirty, you have to do a git stash
first, and then agit stash apply
after.
0 0
- 移除GitHub上的commit
- 从Github中的Commit历史移除敏感文件
- Git - 如何移除commit
- 在 github 上快速查看 commit 内容
- GitHub Atom - 移除编辑器内的竖线
- 移除UIView上的所有控件
- 移除view上的所有subView
- 移除superView上的subviews
- 移除界面上的一个view
- github存在错误的未commit文件
- 修改 Github commit 的作者信息
- Git 回退即删除本地仓库commit版本以及删除远端仓库相应的版本(即github上的commit版本)
- how to remove file and commit from history(如何移除 commit 歷史紀錄)
- 如何commit到特定的commit id上?
- Android移除EditText上的输入焦点实例
- WordPress 技巧:移除 Admin Bar 上的 WordPress Logo
- 如何移除一个View上的所有控件
- 父视图上按钮的添加移除
- 在Android开发中,如何结束整个应用程序
- eclipse sip插件
- MySQL存储过程和函数
- 种花的邮差
- nftl算法分析
- 移除GitHub上的commit
- 编程之美 -- 只考虑加法的面试题,程序理解和分析
- 不需要栈的二叉树遍历的非递归算法
- 视区百分比,canvas.toBlob()以及WebRTC
- C 二分查找算法
- .NET 事件
- html基础
- anjuta中编译找不到math库
- poj 3169 Layout 差分约束模板题