-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
git-imerge: update for the latest version #8118
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
# git-imerge | ||
|
||
> Perform a merge or rebase between two Git branches incrementally. | ||
> Perform an incremental merge or rebase between two Git branches. | ||
> Conflicts between branches are tracked down to pairs of individual commits, to simplify conflict resolution. | ||
> More information: <https://github.com/mhagger/git-imerge>. | ||
|
||
- Start imerge-based rebase (checkout the branch to be rebased, first): | ||
|
||
`git imerge rebase {{branch_to_rebase_onto}}` | ||
`git-imerge rebase {{branch_to_rebase_onto}}` | ||
|
||
- Start imerge-based merge (checkout the branch to merge into, first): | ||
|
||
`git imerge merge {{branch_to_be_merged}}` | ||
`git-imerge merge {{branch_to_be_merged}}` | ||
|
||
- Show ASCII diagram of in-progress merge or rebase: | ||
|
||
`git imerge diagram` | ||
`git-imerge diagram` | ||
|
||
- Continue imerge operation after resolving conflicts (`git add` the conflicted files, first): | ||
|
||
`git imerge continue --no-edit` | ||
`git-imerge continue` | ||
|
||
- Wrap up imerge operation, after all conflicts are resolved: | ||
- Finish a merge or a rebase, after all conflicts are resolved: | ||
|
||
`git imerge finish` | ||
`git-imerge finish` | ||
|
||
- Abort imerge operation, and return to the previous branch: | ||
- Abort imerge operation and clean up temporary commits: | ||
|
||
`git-imerge remove && git checkout {{previous_branch}}` | ||
`git-imerge remove` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I disagree with this change. The first part of the sentence ("Abort imerge operation") already refers to the cleaning up of the temporary commits. I don't think we need to specify that detail, especially since there's no mention of temporary commits before this.
In the same vein, I think it is better to keep the second part of the sentence and command, i.e. the extra step of returning to the original branch, as otherwise users would be left in a detached HEAD state. This is in fact recommended in the tool's documentation.
There are two issues for implementing a proper imerge-aborting subcommand (mhagger/git-imerge#123 and mhagger/git-imerge#189) but until then, this should not be presented stand-alone as if it were a fully supported operation of the git-imerge tool — it's more like plumbing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe replace that with
git rebase --abort
? If I remember correctly, it returns to the original branch automatically.There are some things I need to do before I can check and confirm the behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think
git rebase --abort
would work; IIUC, the imerge operations aren't registered by git as a regular rebase. But do test and let us know :)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I haven't used the
merge
capability, onlyrebase
, and right now I don't have any PRs that need conflict resolution to test this. Looks like writing tests https://github.com/mhagger/git-imerge/tree/master/t would take a few hours, and I need them to complete other things.Basically the testing plan.
rebase
on aconflicting
branchremove
and see ifgit
switched back toconflicting
merge
on aconflicting
branchremove
and see ifgit
switched back toconflicting
rebase
on aconflicting
branchgit rebase --abort
and see ifgit
switched back toconflicting
merge
on aconflicting
branchgit merge --abort
and see ifgit
switched back toconflicting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests for imerge would be awesome! Alternatively, in case writing the tests proves too burnensome, @mhagger himself could confirm whether
git rebase --abort
is a viable alternative to manuallygit checkout
ing (orgit switch
ing) to the previous branch.