This is a little trick from git if you need to make your commits nice and clean.
If you need to take the above three commits to a single nice commit you can use the git squash,
so let's take the all the 3 commits to the first WIP commit, which is
b011ff7 WIP test case 1Type below command in your terminal.
git rebase -i HEAD~3
Each line represents a commit (in chronological order, the latest commit will be at the bottom).
To transform all these commits into a single one, change the file to this and save and exit
To transform all these commits into a single one, change the file to this and save and exit
This means, you take the first commit, and squash the following onto it. If you remove a line, the corresponding commit is actually really lost.
your editor will open once more to ask for a commit message for the squashed commit and change the commit message as you wish. Finally, you will get your changes to one single commit.
Thank you !!!
Thanks bro. it helps me lot.
ReplyDeleteglad it helps you
Delete