Skip to content

Commit 62d7453

Browse files
authored
Refine description
1 parent 5b6229b commit 62d7453

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
11
# Create Magic Merge Commit
22

3-
Ever build on a branch which meanwhile was squashed-merged into `main` and then you wanted to merge a pull request that was based on that branch? You know, the one that has a commit that conflicts with the squashed commit in `main`?
3+
Have you ever created a branch based on another branch?
4+
Then that other branch got [squash-merged](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/about-merge-methods-on-github#squashing-your-merge-commits) into `main`.
5+
Now your pull request, which was based on that branch, can’t merge cleanly because Git sees your old commit as conflicting with the squashed commit in main?
46

5-
This tool creates a "magic" merge commit that resolves the conflict by connecting the two branches together, allowing you to merge without conflicts.
7+
This tool generates a special merge commit that links your branch to the squashed history in `main`, eliminating the conflict and letting you merge `main` without trouble.
68

7-
Execute is with following command:
9+
Execute the tool with following command:
810

911
```terminal
1012
jbang do@koppor/magic-merge-commit <pr-number>
1113
```
1214

13-
For this, you need to have [jbang](https://www.jbang.dev/) installed.
15+
## Installation
16+
17+
To have `jbang` working, you need to install it. Find information at the [jbang page](https://www.jbang.dev/).
1418

1519
If you don't want to install jbang, place [`gg.cmd`](https://github.com/eirikb/gg#ggcmd) into the root of your git repository and execute as follows:
1620

1721
- Linux/macOS: `sh ./gg.cmd jbang do@koppor/magic-merge-commit <pr-number>`
1822
- Windows: `.\gg.cmd jbang do@koppor/magic-merge-commit <pr-number>`
1923

20-
## Visualization of the process
24+
## Step-by-step description of the scenario
2125

2226
### 1. First pull request is created
2327

0 commit comments

Comments
 (0)