From ba0686a567ed4e9a11a833bec4659e47ac8d4028 Mon Sep 17 00:00:00 2001 From: Sumon C <133718514+SumonGFC@users.noreply.github.com> Date: Tue, 3 Sep 2024 12:42:27 -0400 Subject: [PATCH] Intermediate Git: Update squash explanation --- git/intermediate_git/a_deeper_look_at_git.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git/intermediate_git/a_deeper_look_at_git.md b/git/intermediate_git/a_deeper_look_at_git.md index 7dad430b6e4..a729fa6e0a0 100644 --- a/git/intermediate_git/a_deeper_look_at_git.md +++ b/git/intermediate_git/a_deeper_look_at_git.md @@ -93,7 +93,7 @@ So let's edit our commit by typing `git commit --amend`, fixing the typo in the #### Squashing commits -Using `squash` for our commits is a very handy way of keeping our Git history tidy. It's important to know how to `squash`, because this process may be the standard on some development teams. Squashing makes it easier for others to understand the history of your project. What often happens when a feature is merged, is we end up with some visually complex logs of all the changes a feature branch had on a main branch. These commits are important while the feature is in development, but aren't really necessary when looking through the entire history of your main branch. +Using `squash` for our commits is a very handy way of keeping our Git history tidier by combining multiple commits into one. It's important to know how to `squash`, because this process may be the standard on some development teams. Squashing makes it easier for others to understand the history of your project. What often happens when a feature is merged, is we end up with some visually complex logs of all the changes a feature branch had on a main branch. These commits are important while the feature is in development, but aren't really necessary when looking through the entire history of your main branch. Let's say we want to `squash` the second commit into the first commit on the list, which is `Create first file`. First let's rebase all the way back to our root commit by typing `git rebase -i --root`. Now what we'll do is `pick` that first commit, as the one which the second commit is being `squash`ed into: