July 19, 2021 06:12 pm GMT
Original Link: https://dev.to/ajayupreti/how-to-squash-3-commits-into-1-3b48
How to Squash 3 commits into 1?
Do git log and see the commits you want to squash is commited first.
if you want squash top 3 commits from your head,
Use this command,
git rebase -i HEAD~3
Here the tilde ~ symbol with 3 pick the top latest three commits and it will pop up in an interactive shell where you can select the top commit and squash other two commits into one by entering s, it means squash.
If your commit is not appearing then do git log and see, if not then
git add filesgit commit -m 'your commit'
Original Link: https://dev.to/ajayupreti/how-to-squash-3-commits-into-1-3b48
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To