Git : Head commit in remote repository is crap - how exactly should I go about replacing it?
- 阅读更多 关于 Git : Head commit in remote repository is crap - how exactly should I go about replacing it?
问题 Alright - so I had a guy (in a school project - don't panic) commit a full eclipse workspace complete with .class files and .settings/ directories. What I did was to clone the repo and make a .gitignore file and issue : $ git reset --soft HEAD^ $ ... unstaged all files and added .gitignore and all files that it filtered in ... Then I tried : $ git commit -c d1cf2d8173234b444c601d5e294a5cf6d790fa2c Where the SHA is the SHA of the online commit. It won't let me push : Pushing to https:/