![]() ![]() When working with topic branches, and especially when responding to code review feedback, a small change can easily grow to span multiple commits. Simply put, a squash merge produces a cleaner history. The result is a single commit on the target branch with all of the changes from a normal merge. The files are merged exactly as they would be in a normal merge, but the commit metadata is changed to show only one of the parent commits. What is squash merge?Ī squash merge is a merge option in Git that will produce a merge commit with only one parent. ![]() ![]() We want to extend a huge thank you to for his work in helping make that a reality.Are you the type of developer that loves to keep your repos neat and tidy? Are you a fan of interactive rebase and fixing up your commits until they’re just right? Do you wish you had an alternative to –no-ff merges when completing your pull request? In the March 3rd release of Visual Studio Team Services, a new option was added to the PR merge process to allow the topic branch changes to be squash merged, greatly simplifying target branch history. Now in your commit history, you can choose to amend your last commit to update the commit message or add changes to the commit.įinally, with today’s release, users on Apple Silicon machines using the new M1 chip will upgrade to a native build of GitHub Desktop, improving performance and reducing crashes. If your working directory has a lot of existing changes and you just want to make a small change though, undo probably isn’t a great fit. GitHub Desktop has long included the ability to undo your last commit to place all of its changes back into your working directory. Now in Desktop, you can check out a new branch from any commit in your history, allowing you to easily view the state of your repo at that point in time while not negatively impacting the branch you’re working on. Many times, you may need to check out an older version of your project to investigate a bug or create a hotfix on top of your latest release. Start a new branch from an earlier commit When you merge, you also now have the option to squash and rebase as part of your merge.Īnd if commits are ordered in a way that’s disparate and hard to follow, now you can just drag and drop them wherever you’d like in your history. If a group of commits represents a single unit of work, or if a project requires that each pull request only has one commit, simply drag them on top of one another to squash them together and add a new commit message that captures the whole picture. Many developers care deeply about their commit history and use it to tell a coherent story about the progression of their project. There’s more of Git now in GitHub Desktop, allowing you to focus on what matters. We’re continuing that momentum and expanding drag and drop to allow you to squash and reorder commits in your history, amend previous commits, start new branches from earlier commits, and more. In GitHub Desktop 2.7, we released cherry-picking and introduced drag and drop, and in GitHub Desktop 2.8 we made several improvements to diffs. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |