Today wrote a day code, and then Git hub commits up to 7 times, but none of the changes are formally pushed up. The result of the final push is found in the middle of a commit file over 100M. Is the Code performance analysis report for vs. vsp file, I can only say really is gigantic, a report actually has 800M. Of course I want to ignore this file, so modify the. gitignore file. But it is too late, because the previous commit already has this file, even if I ignore it in the new commit, the previous commit can not be pushed up. Then you have to abandon all the commits without a face. Re-come.
1. First back up all of today's changes.
2. Discard all commits:
A. Copy the head version of the SHA from master
b. Git reset--hard SHA
3. Copy today's changes, note that only copy code changes, do not copy the relevant git files back, or git will say your branch is ahead of the Master 7 commits Blablabla ...
4. Then resubmit the code. Git add-a, git commit-m "Your log", Git push
Finally mention a wake up, if there is a change the best or direct push up good, or to the last tired is their own. Today's code did not write a few lines, do git. Sad.
How to discard a history commit before git push