Part 14: How to perform git squash (merge 2 or more commits into single commit)?

preview_player
Показать описание
You will find this video tutorial very helpful if you want to learn about Git version control. In this video, I talk about how to perform git squash (merge 2 or more commits into a single commit)?

Terminal commands used in this video:
1. git rebase -i HEAD~3

🔴 Subscribe for more free awesome videos:

Share this video with a YouTuber friend:

✅ Recommended playlists:

Google Summer of Code Tutorial Playlist::
==========

✅ Follow me:
==========

TAGS:
git squash, all commits into one, merge multiple commits into a single one, last 2 commits, merge, commits after push, Combining Git commits with squash, how to, squashing multiple commits into one, git rebase -i, git commit, git tutorial, combine git commits, interactive rebase, working history, rewrite history, code of duty
Рекомендации по теме
Комментарии
Автор

In this video I have showed how you can perform git squash. Git squash is used to merge two or more commits into single commit.

Do checkout if you want to learn something very useful and life savior.😀

codeofduty
Автор

Thank you so much...you saved my time..short and good video...and it worked for me.

arpithaakhilshetty
Автор

After squashing in order to reflect on UI ....do we need to "git push origin branch"

jacobtrr
Автор

This is nice. Just one small thing about git push --force would have been great !!

akshaybaura
Автор

whoever using the Windows, the Enter = "i" (for editor) and also use the back option to "q" for windows

moubiswasEdits
Автор

Thank you for explaining that there must be a commit above the line of the commit you want to "squash". I always got a git error stating: error: cannot 'squash' without a previous commit. This was so confusing! I did not understand what it meant until now. Programmitcally this makes sense, I guess, because the computer reads top to bottom, but what if I want to squash in the other direction.. hhhmmmm? I guess it's not worth wasting time over, but seriously, that error was very confusing regarding such a simple concept.

senorharris
Автор

this video is seriously so amazing and easy to understand 😊 but could you please make some large size fonts in the terminal it's not clearly visible on my laptop screen 13.5

kunalsoni
Автор

if i have 3 commits to the same file and as if they are better version than the previous commit now while pull requested its reflection all those 3 previous commits instead i want only the lastest commit to be reflected will the rebase do the same?

huzaif.