Hello, Jim.
In this lesson, I'm going to show you how interactive remise works.
Today, I will show you when and how you can use interactive free based on real examples.
I will show you how you can change any message from your repository history and we'll show you how to
combine to commit into one.
After this lesson, you learn how to squash it.
I will share with you best practices of working with give and keep good history clean.
Let's start and we will start from the example that we had in previous lesson.
Imagine that the men on the task branch, you understood that you have to do one more comment.
Probably you forgot to add some styles.
For the sake of example, let me adjust carousel to assess file nonhostile slash carousel dot to assess.
I will just put new ones here to not spend a lot of time on modifying this file.
I add these changes to the staging area get at DOT and now you need to include latest changes into your
branch.
What you can do.
The first option, which we have already learned, and which I want to remind you is to amend the last
commit like this yet come.
It was optional and was optional added.
This will allow you to change your latest commit without changing commit message.
But let's pretend you didn't want to amend commit for some reasons and want to create one more comment.
When you're dealing with comments that were merged into your branch by a colleague of yours who doesn't
know, get as good as you are.
And that's why you have Xhaka credit for this change.
Let me create a committee now.
You can meet with Option M to assess class for homecare.
So Slider is added, OK, and now you have to comments on your branch.
Let's add one more comment.
We need this to have at least three comments to play with on our branch.
That is for the sake of the demo, the same as before.
I will quickly adjust our two file and I will create one more snapshot nonhostile slash Carasso dot
to assess engine your lines here.
You'd commit dash a dash and one Monticello's glass for home Kurzel Slider is added.
OK, now we have three comments.
Imagine that you are not happy with Canet message and want to change it.
What options do you have to adjust?
Can it get can it was option amand but what if you don't want to change economic message for the latest
comment?
What if you want to change economic message that goes right before the last one?
Interactive information will help you with this.
What is interactive freebase?
Interactive Freebasing?
It makes it easy to clean up your comments before they get based or moved onto another branch.
Military base was option I had to the three I stands for interactive free base, we want to proceed
with interactive rebates for last's recommits.
That's why I wrote Hand.
That is a pointer to our current state.
Delusory.
That means recommits back from the current one.
Lets press enter now.
Awesome.
Here we see our three last Kummetz starting from the latest to the newest.
And I see that the change message I have to write are letter near the camp where I want to change cammed
message and I want to change not the last message but commit message that goes before the last one.
So I put our letter next to the USS Glassful home carrousel is added commit message.
I say file by pressing control and s and close the text editor in this window we can change comit message
as we wish.
Let's add more details to first class for scrolling Carasso on the home page is added.
Now, let's save this file and close the text editor here, you can see notification that we successfully
based and updated the branch.
Let's check in with history, long story.
And we can see that my message for this CANET and check some of this can it was changed grade after
we changed the message for comment.
We took a look at our branch history one more time and realize that it is way too many comments about
the same thing.
We have three comments right now for the one single piece of functionality.
We know that in case we would put this change to the remote repository, our tech might be disappointed.
Why?
Because was the one single task grade style and focus on the home page.
We have three committees right now.
Instead of having one single command, your tablet might ask you to squash comments in order to keep
Guitry clean.
What does squash mean?
In other words, you can combine two or more commands into the one to ensure clean good history.
You can mount Kummetz so they would disappear, but not the changes which were done in scope of these
snapshots.
Let's imagine the case that during the development of your task, you get multiple commands and after
that you realized that it would be better to have either one commit a group, commit in a different
manner how to do this.
Interactive rebase will help us also with this task.
Guitry base was option.
I had killed the three.
You're already familiar with this command.
You can specify as many comments backwards as you want instead of three.
I am specifying only three right now because we all remember four rules of happy work with Gaete.
From the previous lesson, I can modify only commands that are on my branch but not commit that already
exist and must have branch I press and at the same time in history, as we already saw today, was ablated
commit message.
We can see that to combine commands we can use either squash or fix up.
Will you squash one.
We want to change it message and fix up one.
We want to keep coming.
The message of the first command.
Most likely if you combine multiple commands, you want to reflect this in the correct message.
That's why more often you're going to squash rather than fix.
An important thing to mention here, you can squash the first commit in the list.
In other words, here in the first row, you should have to be able to squash all the comments I wrote
as letter near to commit s stands for squash.
And in case you forgot, you can find other shorthands here.
I press control and ask to save the file and close it now and ask my I to address commit message.
I see the command lines and commit messages of my other comments.
Let me clean this up a bit and leave the one message which I'd like to keep.
In addition to this one I want to add a few words is styled.
I save the file and close it.
I see a message that I successfully replaced.
What else potentially might happen here?
Potentially you can see a message about much conflict during are basin similar to the one you saw in
previous lesson.
Take into account you combine comments that might be merged conflicts, but you don't really know how
to deal with conflicts during the invasion.
Since we showed this in the previous lesson, let's check our command history now.
Get log dash three.
Great, you can see our comment was updated message and pay attention.
You took some if checksum is different, your you know, that pushed the remote repository will be rejected.
Beside our audit committee here, you can see all the comments from the remote master branch.
And we can see here our chametz, where we adjusted Susanne's file because they're mounted.
But the changes are in place.
We can open our chasez file just to check this Nuna styles, Desh, Castle, Dot to assess and find
that newlines.
Edit editing first commit and new line so that you're in the second place.
We can count number of new lines, but I believe it is even visually obvious.
We did all we wanted and you already know that in case there is a difference between comment history
and my local branch and remote branch, we need to for update our remote repository and unpressed lesson
learned best practices.
And we are going to use force with at least now used brute force with less.
We added additional changes and combine them in one snapshot and updated our budget request.
This will make you happy on your future project, I promise you.
Now let's recap what we have learned today.
In this lesson we learned what interactive rebase is.
You learn how to start interactive replays.
You saw how you can change any commitments that in your repository after this lesson, you also know
how to combine few comments together.
We learned best practices of working with Gaede today.
That's all for now.
Thanks a lot for your attention.
See you in the next lesson.