-
Notifications
You must be signed in to change notification settings - Fork 223
Merge multiple heads #793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge multiple heads #793
Conversation
I'm sorry. This is not the recommanded way to merge branches in Of the other software I have used, very few offer this functionality. |
The point of this PR was not to simplify merges, but rather to allow performing multi-parent merges. Currently SourceGit user would have to perform those in terminal with a bit of additional effort of copy-pasting the branch names and/or commit IDs. That said, I understand that you might not be willing to provide and support UI for every git feature out there, so if this feature is not wanted, please go ahead and close this PR. |
I understand that some users like to use this way to merge multiple branches/commits at once. However, in this software, I do not recommend this. Because this action can be broken down into merging just one branch and doing it multiple times. This makes it easier to resolve conflicts or understand the entire commit history. |
Anthor reason that why I do not want to introduce this feature is that in most cases, the functions of different branches need to be merged into the main branch after the test of it has completed without issues, and merging multiple branches at once then test may make it difficult to findout which branch introduced the new issue. |
In my current working project, merging multiple branches at once is prohibited. Committers need to ensure the branch, which they want to merge into main branche, includes all necessary changes. And if necessary, they need to use commands such as |
We used to have 2 cases when we did multiple parent merges:
|
* do NOT modify the existing merge, and add a new constructor for `Commands.Merge` instead * rewrite `ViewModels.MergeMultiple` - since `_histories.Commits.Find` may returns null, use `List<object>` instead of `List<Models.Commits>` - supports display merge target as both `Models.Commit` and `Models.Branch` * rename translation key `Text.MergeMultiple.Commit` to `Text.MergeMultiple.Targets`, and add translations for zh_CN and zh_TW * some UI/UX changes
All right, you've convinced me. I've merge this PR into |
Thank you! |
BranchCM.MergeMultiBranches, CommitCM.MergeMultiple, MergeMultiple sourcegit-scm#793 CommitCM.Merge 2053ce0 CommitDetail.Files.Search 894f3e9 Diff.UseBlockNavigation sourcegit-scm#703 FileCM.ResolveUsing 3b5d873 Hotkeys.Global.Clone bea2a39 InProgress.CherryPick.Head e1df5c5 InProgress.Merge.Operating ef40e4b InProgress.Rebase.StoppedAt, Repository.Skip sourcegit-scm#790 InProgress.Revert.Head 93d9a04 Merge.Source 2504a52 WorkingCopy.CommitToEdit c136821
* localization: add missing de_DE keys BranchCM.MergeMultiBranches, CommitCM.MergeMultiple, MergeMultiple #793 CommitCM.Merge 2053ce0 CommitDetail.Files.Search 894f3e9 Diff.UseBlockNavigation #703 FileCM.ResolveUsing 3b5d873 Hotkeys.Global.Clone bea2a39 InProgress.CherryPick.Head e1df5c5 InProgress.Merge.Operating ef40e4b InProgress.Rebase.StoppedAt, Repository.Skip #790 InProgress.Revert.Head 93d9a04 Merge.Source 2504a52 WorkingCopy.CommitToEdit c136821 * localization: consistently use clone with 'k' for most other keys a more "germanized" version with a k is used rather than a c
This PR adds an ability to merge multiple heads. The operation can be started either from the commit view or from the branch list (second commit). As such merges often cannot be carried out automatically, the user is allowed to choose to use "ours" strategy for the merge, which allows to record a merge and lets user to continue (which would typically include cherry-picking needed commits manually and squashing them into the merge commit).