# Resolving a Git conflict — prompt for ChatGPT

Merge a conflicting excerpt according to both branches' explicit requirements and show where manual decisions are needed.

Canonical URL: https://boswidget.ru/en/resolving-a-git-conflict-prompt-for-chatgpt/

Model: ChatGPT

Category: Code

Tags: Git, conflict, merging

![Resolving a Git conflict](https://boswidget.ru/assets/images/text-preview-cg-razreshenie-tekstovogo-konflikta-git-1200.3405d29689fd.webp)

Resolving a Git conflict

## Prompt

Help resolve this text conflict: {conflict}. Intent behind each side's changes: {intent}. Required behavior: {rules}. Explain what each side preserves, propose a merged excerpt without conflict markers and list the decisions made. Do not discard a branch merely because it is shorter. If requirements conflict, do not choose silently: show the options and a question for the owner. Give result checks without claiming a build, Git execution or successful merge.

## Template fields

- `{conflict}` — Conflict. Example input: Small excerpt with conflict markers
- `{intent}` — Purpose of each branch. Example input: What each side wanted to change
- `{rules}` — Behavior. Example input: Which requirements must remain after merging

## Launch

[Open ChatGPT in YesAI](https://yesai.su/en/chatgpt)
