Service eligibility and regional restrictions
PuppyIP serves only compliant overseas businesses and their authorized personnel. Proxy services are not available in mainland China. The service may only be used for lawful business activities outside mainland China. Use of this service within mainland China is prohibited.
Hosting a proxy IP or server overseas does not change these restrictions. The service must not be provided to end users in mainland China through relaying, forwarding, sharing or resale. Before use, read the Terms of Service.
Key Takeaways
- Git 2.56.0's official release date is September 28, 2026. Check the Git version running in the current terminal before using it.
- Inspect unmerged paths, then specify files as needed. Existing staged content still requires separate review.
- After a leftover-marker error, fix the reported files and repeat the scoped staging step.
- Finally inspect staged changes, remaining unmerged paths and unrelated edits before continuing the original merge or rebase workflow.
When --resolved is useful
Suppose you are merging a feature branch: src/invoice.php has a conflict, while notes/local.txt contains personal notes you do not yet want to commit. You need Git to accept the resolved business file while preserving the notes' state. This is an illustrative scenario; filenames explain the operation and are not a test record.
GitHub introduced this capability in its September 28, 2026 Git 2.56 highlights. This article checked the official manual on October 5 Beijing time and focuses on staging after conflict resolution. A later social post does not change the version's release date to today.
Step 1: Confirm the version and preserve the initial state
Run the following two commands in the repository terminal where you intend to work. Read the results before staging, especially which files were already staged.
git --version
git status --short
Different terminals and editors may use different Git installations. For unknown option or an unrecognized resolved option, check the actual version and that version's git add help. Version 2.56 introduced it, but installation channels update at different rates. Running a new installer does not prove every entry point was upgraded.
This workflow does not clear existing staged content. Previously staged files can still enter the final commit even if you now select only conflicts. Recording the initial state lets you identify what this operation added.
Step 2: Resolve files, then limit the staging scope
List current unmerged paths, open each file and decide the final content using both sides' changes. Do not merely delete separators while retaining contradictory code.
git diff --name-only --diff-filter=U
After reviewing the illustrative src/invoice.php, select only that file. Replace the example path with a real file you just checked, and keep quotes around paths containing spaces.
git add --resolved -- "src/invoice.php"
To check all remaining unmerged paths, run git add --resolved without a file scope. The option selects by unmerged state in the index and does not include ordinary nonconflicting files. A file already staged as resolved but edited again needs separate review and handling; do not expect this option to select it again.
Why leftover conflict markers can leave every selected file unstaged
The official behavior is to refuse staging the entire selected group if any selected regular file still contains conflict markers during checking. When selecting several files, one unresolved file can leave the already-fixed files unmerged too. The group is checked before it is staged.
Open the reported files, resolve missed conflict blocks, save and repeat the command with the same scope. If you intended to handle only one file, verify its result and narrow the scope with an explicit path. Do not respond to an error by staging the whole repository.
When file content intentionally resembles conflict markers, a person must determine its purpose. The command cannot decide which content to keep, and successful execution alone cannot establish business correctness.
Step 3: Review staged content and remaining work separately
Run git status --short again after staging, then inspect staged and unstaged diffs separately. For non-unmerged paths, the two short-status columns correspond to index and working tree; remaining conflicts use unmerged-state meanings. One M before a filename does not mean every change is handled.
git diff --cached
git diff
git diff --name-only --diff-filter=U
Compare with the initial record: is the final business-file diff correct, are notes still in their original state, and which conflicts remain? An empty unmerged list resolves only that layer of state. Run the project's required tests or checks, then continue the original merge, rebase or cherry-pick workflow.
When using an AI coding assistant for conflicts, still review final diffs and test results. Delegating execution does not reduce the need to verify file scope, existing staging and logical correctness.
Binary files, deletions and ordinary staging
--resolved cannot be combined with -u or -A and is not enabled by default in ordinary git add. If these options are mixed, return to one explicit staging mode and inspect the result.
The official manual allows binary files and deletions to be staged as resolutions, but they have no text content suitable for marker checks. For images, archives and deletions, use previews, validation or project checks to establish which version is retained. No markers does not mean the correct choice was made automatically.
Acceptance requires intended scope, reviewed final content and recorded remaining work. Confirm each before continuing the original workflow, rather than treating staging and commit acceptance as one step.
Sources
Frequently Asked Questions
Will git add --resolved stage other modified files?
It selects only files still unmerged in the index and within the requested path scope. Existing staged content is not cleared, so inspect git diff --cached before committing.
Does command success prove the conflict was resolved correctly?
No. Staging state and business correctness require separate checks, especially final diffs, binary files and deletions, plus the project's required validation.
Why is resolved still unrecognized after upgrading?
Check git --version and the corresponding git add help in the failing terminal. Verify whether the editor or another terminal uses a different Git installation; do not assume all entry points share a version.
Can I stage one file before resolving the others?
Use an explicit path, for example git add --resolved -- "src/invoice.php". The filename is illustrative; replace it with an actual reviewed path before execution.