
The following message is returned from Git: ch10.asciidoc: needs merge

There are no merge conflict markers in the file, so I proceed to Step 2. I do this by editing the file in question and looking for merge conflict markers.Īt this point CH10 is an out-of-date version of the file which existed at an earlier point.
#Revert single file to master git Patch#
The copy of the patch that failed is found in: Patch failed at 0001 CH10: Stub file added with notes copied from video recording lessons. Version CH10: Stub file added with notes copied from video recording lessons. Using index info to reconstruct a base tree.įalling back to patching base and 3-way merge.ĬONFLICT (modify/delete): ch10.asciidoc deleted in HEAD and modified in CH10: Stub file added with notes copied from video recording lessons. First, rewinding head to replay your work on top of it.Īpplying: CH10: Stub file added with notes copied from video recording lessons. The following is the output from the first mid-rebase conflict. If you run into a conflict mid-rebase, Git will stop the procedure and ask you to deal with it. If there are no conflicts, Git will skip merrily through the process and spit you out the other end. Begin RebasingĬhange into the branch which is currently out-of-date from the main project, but which contains new work that hasn't been introduced yet:
#Revert single file to master git free#
This is a free excerpt from my upcoming book Git for Teams. This piece walks you through how I brought the branch ch10 up-to-date while keeping the latest version of the file ch10.asciidoc (from ch10) in place. Bringing ch10 up-to-date via rebasing meant dealing with the conflict whereby the updates in drafts would result in the file being removed from ch10, which was not what I wanted as a final outcome.

Eventually I got around to it, but in the mean time, I'd also made a bunch of edits to the chapter file in the branch ch10. Unfortunately I forgot to delete the stub file for Chapter 10 in the branch drafts. I separated work-in-progress into per-chapter branches. Once I had a few chapters finished, I uploaded the files to the builder server and realised it made for a very ugly document. The scenario: At the very beginning of the project, I stubbed out a number of chapter files in the branch drafts. This is a walk-through of how I recently resolved a mid-rebase conflict.
