mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
26 lines
640 B
Plaintext
26 lines
640 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# git merge-one-file
|
|
|
|
> Resolve a single file merge after a trivial merge.
|
|
> More information: <https://git-scm.com/docs/git-merge-one-file>.
|
|
|
|
- Resolve a simple merge conflict for a file:
|
|
|
|
`git merge-one-file {{path/to/file}}`
|
|
|
|
- Use as a helper in merge-index for a file:
|
|
|
|
`git merge-index git-merge-one-file {{path/to/file}}`
|
|
|
|
- Handle a binary file merge:
|
|
|
|
`git merge-one-file -p {{path/to/file}}`
|
|
|
|
- Apply after read-tree in a scripted merge:
|
|
|
|
`git read-tree -m {{branch1}} {{branch2}} && git merge-index git-merge-one-file {{path/to/file}}`
|