Skip to content

Commit c9d52da

Browse files
authored
Merge pull request #100 from mhagger/drop-and-revert
Add two new subcommands: `git imerge drop` and `git imerge revert`
2 parents e8da000 + 49ac1c2 commit c9d52da

8 files changed

Lines changed: 1014 additions & 502 deletions

File tree

README.rst

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -83,20 +83,40 @@ To start a merge or rebase operation using ``git-imerge``, you use
8383
commands that are similar to the corresponding ``git`` commands:
8484

8585
.. list-table:: Starting an incremental merge or rebase
86-
:widths: 50 50
8786
:header-rows: 1
8887

89-
* - ``git`` command
90-
- ``git-imerge`` equivalent
91-
* - ``git merge BRANCH``
92-
- ``git-imerge merge BRANCH``
93-
* - ``git rebase BRANCH``
94-
- ``git-imerge rebase BRANCH``
95-
96-
For more flexibility, you can start an incremental merge using ``git
97-
imerge start``::
98-
99-
git-imerge start --name=NAME --goal=GOAL --first-parent BRANCH
88+
* - ``git-imerge`` command
89+
- ``git`` analogue
90+
- Effect
91+
* - ``git-imerge merge BRANCH``
92+
- ``git merge BRANCH``
93+
- Merge ``BRANCH`` into the current branch.
94+
* - ``git-imerge rebase BRANCH``
95+
- ``git rebase BRANCH``
96+
- Rebase the current branch on top of ``BRANCH``
97+
* - ``git-imerge revert COMMIT``
98+
- ``git revert COMMIT``
99+
- Add a new commit that undoes the effect of ``COMMIT``
100+
* - ``git-imerge revert COMMIT1..COMMIT2``
101+
- ``git revert COMMIT1..COMMIT2``
102+
- Add new commits that undo the effects of ``COMMIT1..COMMIT2``
103+
* - ``git-imerge drop COMMIT``
104+
- ``git rebase --onto COMMIT^ COMMIT``
105+
- Entirely delete commit ``COMMIT`` from the history of the
106+
current branch
107+
* - ``git-imerge drop COMMIT1..COMMIT2``
108+
- ``git rebase --onto COMMIT1 COMMIT2``
109+
- Entirely delete commits ``COMMIT1..COMMIT2`` from the history
110+
of the current branch
111+
112+
(``git-imerge drop`` is also analogous to running ``git rebase
113+
--interactive``, then deleting the specified commit(s) from the
114+
history.)
115+
116+
A few more options are available if you start the incremental merge
117+
using ``git imerge start``::
118+
119+
git-imerge start --name=NAME --goal=GOAL [--first-parent] BRANCH
100120

101121
where
102122

TODO.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,12 @@ Convenience features
3030
manual merge conflicts into suggested log messages for the
3131
simplified commits.
3232

33-
* Maybe remember the names of the two original branches for use in log
34-
messages etc. (Should they be stored locally in ``git config`` or
35-
shareably in the state blob?)
36-
3733
* Allow the user to specify which conflict he would like to resolve
3834
next, and set it up for him.
3935

4036
* Allow the user to block certain merges, meaning that they should
4137
never be skipped over or merged automatically.
4238

43-
* Think about where to leave HEAD in the various scenarios.
44-
4539
* Add a ``git imerge pause`` that puts an imerge on hold and resets
4640
the working copy to a reasonable state.
4741

0 commit comments

Comments
 (0)