@@ -322,7 +322,7 @@ <h2>SYNOPSIS</h2>
322322< div class ="sectionbody ">
323323< div class ="verseblock ">
324324< div class ="content "> < em > git checkout</ em > [-q] [-f] [--track | --no-track] [-b <new_branch> [-l]] [-m] [<branch>]
325- < em > git checkout</ em > [<tree-ish>] [--] <paths>…</ div > </ div >
325+ < em > git checkout</ em > [-f|--ours|--theirs|-m|--conflict=<style>] [ <tree-ish>] [--] <paths>…</ div > </ div >
326326</ div >
327327< h2 id ="_description "> DESCRIPTION</ h2 >
328328< div class ="sectionbody ">
@@ -337,13 +337,19 @@ <h2 id="_description">DESCRIPTION</h2>
337337the first namespace level.</ p > </ div >
338338< div class ="para "> < p > When <paths> are given, this command does < strong > not</ strong > switch
339339branches. It updates the named paths in the working tree from
340- the index file (i.e. it runs < tt > git checkout-index -f -u</ tt > ), or
341- from a named commit. In
342- this case, the < tt > -f</ tt > and < tt > -b</ tt > options are meaningless and giving
340+ the index file, or from a named commit. In
341+ this case, the < tt > -b</ tt > options is meaningless and giving
343342either of them results in an error. <tree-ish> argument can be
344343used to specify a specific tree-ish (i.e. commit, tag or tree)
345344to update the index for the given paths before updating the
346345working tree.</ p > </ div >
346+ < div class ="para "> < p > The index may contain unmerged entries after a failed merge. By
347+ default, if you try to check out such an entry from the index, the
348+ checkout operation will fail and nothing will be checked out.
349+ Using -f will ignore these unmerged entries. The contents from a
350+ specific side of the merge can be checked out of the index by
351+ using --ours or --theirs. With -m, changes made to the working tree
352+ file can be discarded to recreate the original conflicted merge result.</ p > </ div >
347353</ div >
348354< h2 id ="_options "> OPTIONS</ h2 >
349355< div class ="sectionbody ">
@@ -361,8 +367,23 @@ <h2 id="_options">OPTIONS</h2>
361367</ dt >
362368< dd >
363369< p >
364- Proceed even if the index or the working tree differs
365- from HEAD. This is used to throw away local changes.
370+ When switching branches, proceed even if the index or the
371+ working tree differs from HEAD. This is used to throw away
372+ local changes.
373+ </ p >
374+ < div class ="para "> < p > When checking out paths from the index, do not fail upon unmerged
375+ entries; instead, unmerged entries are ignored.</ p > </ div >
376+ </ dd >
377+ < dt >
378+ --ours
379+ </ dt >
380+ < dt >
381+ --theirs
382+ </ dt >
383+ < dd >
384+ < p >
385+ When checking out paths from the index, check out stage #2
386+ (< em > ours</ em > ) or #3 (< em > theirs</ em > ) for unmerged paths.
366387</ p >
367388</ dd >
368389< dt >
@@ -427,9 +448,13 @@ <h2 id="_options">OPTIONS</h2>
427448< dt >
428449-m
429450</ dt >
451+ < dt >
452+ --merge
453+ </ dt >
430454< dd >
431455< p >
432- If you have local modifications to one or more files that
456+ When switching branches,
457+ if you have local modifications to one or more files that
433458 are different between the current branch and the branch to
434459 which you are switching, the command refuses to switch
435460 branches in order to preserve your modifications in context.
@@ -441,6 +466,20 @@ <h2 id="_options">OPTIONS</h2>
441466paths are left unmerged, and you need to resolve the conflicts
442467and mark the resolved paths with < tt > git add</ tt > (or < tt > git rm</ tt > if the merge
443468should result in deletion of the path).</ p > </ div >
469+ < div class ="para "> < p > When checking out paths from the index, this option lets you recreate
470+ the conflicted merge in the specified paths.</ p > </ div >
471+ </ dd >
472+ < dt >
473+ --conflict=<style>
474+ </ dt >
475+ < dd >
476+ < p >
477+ The same as --merge option above, but changes the way the
478+ conflicting hunks are presented, overriding the
479+ merge.conflictstyle configuration variable. Possible values are
480+ "merge" (default) and "diff3" (in addition to what is shown by
481+ "merge" style, shows the original contents).
482+ </ p >
444483</ dd >
445484< dt >
446485<new_branch>
@@ -603,7 +642,7 @@ <h2 id="_git">GIT</h2>
603642</ div >
604643< div id ="footer ">
605644< div id ="footer-text ">
606- Last updated 2008-09-19 06:32:44 UTC
645+ Last updated 2008-10-10 15:30:41 UTC
607646</ div >
608647</ div >
609648</ body >
0 commit comments