Skip to content

bobvanderlinden.me

Tag: #git

Autosquash in Git

Keeping commit history in pull requests clean can be hard. git-rebase offers some methodologies to alter history, but often this results in a clunky workflow.

Autosquash is a feature of git-rebase that I have recently grown fond of. It can be used to more easily alter commits in history. In this post I'll give some insight how autosquash can be used in practice.

Rename commits in Git

Working on large pull requests can be hard. It often is even harder to review them. A clean commit history can help reviewers out. Naming the commits consistently can help in that regard. Often it is hard to do this consistently beforehand, so sometimes it would be nice to rename commits after already committing them.

In this post I'll explain 3 methods of renaming commits: