In SourceTree, we first check out the feature1 branch, We right-click on the master branch and select Rebase. I then right-click on the original commit I branched from and picked 'rebase children of xxxx interactively'. So I want to squash them all into 1 commit with all 4 changes in it. I right-click on the top 1 and pick 'Squash with previous commit'. ![]() That then says and message is 'xxx (+1 squashed commits)'. I then right-click on that and squash it, then do it again. Squash and Rebase - Git Basics for good developers The Startup 500 Apologies, but something went wrong on our end. Now I have 1 line that still says " and 'xxx (+1 squashed commits)', but there are four commits when I expand it. Refresh the page, check Medium ’s site status, or find something interesting. Now I right-click on the top line and edit the message and it says '' and the message is my new 'All Changes' message. Looks good, right? So when I hit 'OK' it works, BUT I STILL HAVE 2 COMMITS. ![]() The first commit in the branch where I added 'a' to the file is still there, even though it was listed in the 4 commits that should be squashed together. Interactive Rebasing with SourceTree, Matthew Setter 71,424 views 304 Dislike Share Save TeamLearnable 6.69K subscribers A lot of us visual thinkers - designers, frontend dev, etc. When I use the command line, I type `git rebase -i `, where is the one I right-click on in source tree. My editor opens up and I 'p'ick the top line and 's'quash for the other three.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |