---
title: "Git - Squashing multiple commits to a single one"
description: "Episode 1 of Misc, by Neeraj Singh."
canonical_url: "https://www.bigbinary.com/videos/misc/git-squashing-multiple-commits-to-a-single-one"
markdown_url: "https://www.bigbinary.com/videos/misc/git-squashing-multiple-commits-to-a-single-one.md"
---

# Git - Squashing multiple commits to a single one

Episode 1 of Misc, by Neeraj Singh.

## Details

- Series: Misc videos
- Duration: 04:34
- Published: February 5, 2016
- [Watch on YouTube: https://www.youtube.com/watch?v=gXCkYkLQ3To](https://www.youtube.com/watch?v=gXCkYkLQ3To)

## Notes

- Merging multiple commits into a single commit.
- [Git-Rebase](http://git-scm.com/docs/git-rebase)
- $ git checkout topic-branch-name $ git rebase -i HEAD~n # n is the number of
  commits you want to merge. $ git push -f # because git push will get rejected

## Links

- [Human page](https://www.bigbinary.com/videos/misc/git-squashing-multiple-commits-to-a-single-one)
