Skip to content

Commit f2e866b

Browse files
committed
feat(docs): add screenshot + testscript
1 parent 3748a2f commit f2e866b

4 files changed

Lines changed: 44 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,8 @@ This will open the current file in diff mode with the conflicts highlighted.
8282
The left side shows the resolution,
8383
the right side shows the differences between the branches.
8484

85+
![diffconflicts screenshot](assets/screenshot.png)
86+
8587
So all you need to do is edit the left side to resolve the conflicts.
88+
89+
To abort the merge, simply `:cquit`.

assets/screenshot.png

44.8 KB
Loading

scripts/make-conflicts.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
3+
git init tmp/testrepo
4+
cd tmp/testrepo || exit 1
5+
6+
cat << EOF > main.js
7+
console.log('Hello, world!');
8+
console.log('This is a test.');
9+
console.log('Goodbye, world!');
10+
EOF
11+
12+
git add main.js
13+
git commit -m 'Commit One'
14+
15+
git branch branchA
16+
17+
cat << EOF > main.js
18+
console.log('Hello, everyone!');
19+
console.log('This is a test.');
20+
console.warn('Goodbye, world.');
21+
EOF
22+
23+
git add main.js
24+
git commit -m 'Commit Two'
25+
26+
git checkout branchA
27+
28+
cat << EOF > main.js
29+
console.log('Hello, world!');
30+
console.log('This is a test!!!');
31+
console.info('Farewell, world!');
32+
EOF
33+
34+
git add main.js
35+
git commit -m 'Commit Three'
36+
37+
git checkout main
38+
git merge branchA

tmp/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.gitignore

0 commit comments

Comments
 (0)