What we're listening to:
Jared

The Hold Steady:
Heaven Is Whenever
Jeff

Paper Route:
Absence

amend git commit

February 4th, 2009

Thanks to the beauty of local git repositories, I no longer worry about committing. So what if things aren’t pretty, its just a snapshot of my work in progress.

When I push to remote, however, its a good idea to clean up these commits. Up till now I’ve been using git rebase -i which, while very handy, can be a bit of overkill for my normal workflow.

Instead I can use

git commit --amend

to squash my new changes into the latest commit. This is what I’ve usually been doing with rebase -i anyways.

And making a new git alias removes the extra typing.

Git ‘R done

blog comments powered by Disqus