1.非常详尽的github操作记录看这里
http://www.worldhello.net/gotgithub/index.html
2. 回滚提交的纪录
首先查看push的纪录,命令git log:
➜ flaskBlogDemo git:(flaskblogforheroku) git log commit 84967c10584eb81a5e6ca918f27bef25e892a017 Author: brackenbo <brackenbo@hotmail.com> Date: Wed Feb 13 19:45:35 2013 +0800 add delete symbol commit c057921d9a513bfb2c0c97d552594e1507cd8a33 Author: brackenbo <brackenbo@hotmail.com> Date: Wed Feb 13 17:52:44 2013 +0800 modify homepage username error
然后选择要回退的版本号,例如:c057921d9a513bfb2c0c97d552594e1507cd8a33,git reset --hard 命令:
➜ flaskBlogDemo git:(flaskblogforheroku) git reset --hard c057921d9a513bfb2c0c97d552594e1507cd8a33
之后用git push -f 提交。