I want to simply squash a bunch of git commits that are no longer needed. I attempted to follow documentation from this site, but I ended up with git saying there is nothing to squash. I only have one branch, so I followed that section. Any ideas?
If I were doing it I'd use "rebase". Assuming you have your branch checked out, and that it is branched from master, do
This will allow you to modify the commits from master to your current branch. In your case, replace
The rebase settings will open in Vim, or whichever editor you set in the
As a side note, the link you gave suggests flatting your feature branch into a single commit. In my opinion this is an awful idea. Commits should represent a meaningful set of changes. A branch is the set of these changes that represents a feature. Squashing everything into one huge commit means it will be harder for other developers to follow your changes.