Skip to main content

conflict-split

Resolve git conflict markers (<<<<<<<, |||||||, =======, >>>>>>>) in any text file after the fact, by keeping one side for every conflict. Handles diff3/zdiff3 style, CRLF files, multiple conflicts. Python 3.9+, stdlib only.

pip install conflict-split
conflict-split data.json --take theirs -i     # keep the incoming side, rewrite the file
conflict-split notes.txt --take both          # keep both sides, print to stdout
conflict-split f.txt --count                  # number of conflicts

--take ours|theirs|both|base (base needs diff3 markers). Exit codes: 0 ok, 1 malformed markers (unterminated/nested), 2 file or encoding error. For cell-wise merging of CSV files use csv-conflict.

Tests

pytest (15 tests; run on Python 3.9 and 3.14).

Support

Free, MIT licensed. If it saved you time: https://paypal.me/RafalBaranowski

Metadata

Release files for conflict-split 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for conflict-split 0.1.0
File Size Uploaded Provenance Actions
conflict_split-0.1.0.tar.gz 4.4 kB Without provenance Details for conflict_split-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for conflict-split 0.1.0
File Interpreter ABI Platform Actions
conflict_split-0.1.0-py3-none-any.whl Python 3 none any Details for conflict_split-0.1.0-py3-none-any.whl

Total release size: 8.7 kB

Release files / conflict_split-0.1.0.tar.gz

Download URL conflict_split-0.1.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5ca3dc157f663f02fecb1ce3a89ec9f7c0ae419ffb44e91bb7af14ce83e07799
BLAKE2b-256 checksum
How to use checksums
4224310513fa74128493394ec00e4f644b482f3e0dc6f945f21ea08b275dd9a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / conflict_split-0.1.0-py3-none-any.whl

Download URL conflict_split-0.1.0-py3-none-any.whl
Size 4.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1baed2251ff3c88a8a41cbc5137171d45a0623b460c013a221acfa42067cf0d9
BLAKE2b-256 checksum
How to use checksums
91e126dca4876e7935f321addd64b55e4295265632e4dd4d77d5cbeb0d47d15c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for conflict-split 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page