Squashing all commits into one
While trying to solve this problem, I cam across this little gem:
https://fundevnotes.wordpress.com/2013/02/17/squash-all-commits-into-one-commit-in-git/
The nicest of the three solutions provided here (in my opinion, at least) is this:
git update-ref -d refs/heads/master
git commit -m "New initial commit"
Written by David North
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#