X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-rerere.txt;h=7ff9b05e680cabc6513f9d8a6aa80eb7eccda82d;hb=3a81b9f571a6b7edd83b3d5f27c3c95d9b1c9d5c;hp=22494b2b2e83c2f51178f74843488de6f31493ed;hpb=d9671b75ad3bbf2f95f11a8571e9beaa12ccf6dd;p=git.git diff --git a/Documentation/git-rerere.txt b/Documentation/git-rerere.txt index 22494b2b2..7ff9b05e6 100644 --- a/Documentation/git-rerere.txt +++ b/Documentation/git-rerere.txt @@ -3,11 +3,11 @@ git-rerere(1) NAME ---- -git-rerere - Reuse recorded resolve +git-rerere - Reuse recorded resolution of conflicted merges SYNOPSIS -------- -'git-rerere' [clear|diff|status] +'git-rerere' [clear|diff|status|gc] DESCRIPTION ----------- @@ -26,6 +26,42 @@ results and applying the previously recorded hand resolution. You need to create `$GIT_DIR/rr-cache` directory to enable this command. + +COMMANDS +-------- + +Normally, git-rerere is run without arguments or user-intervention. +However, it has several commands that allow it to interact with +its working state. + +'clear':: + +This resets the metadata used by rerere if a merge resolution is to be +is aborted. Calling gitlink:git-am[1] --skip or gitlink:git-rebase[1] +[--skip|--abort] will automatically invoke this command. + +'diff':: + +This displays diffs for the current state of the resolution. It is +useful for tracking what has changed while the user is resolving +conflicts. Additional arguments are passed directly to the system +diff(1) command installed in PATH. + +'status':: + +Like diff, but this only prints the filenames that will be tracked +for resolutions. + +'gc':: + +This command is used to prune records of conflicted merge that +occurred long time ago. By default, conflicts older than 15 +days that you have not recorded their resolution, and conflicts +older than 60 days, are pruned. These are controlled with +`gc.rerereunresolved` and `gc.rerereresolved` configuration +variables. + + DISCUSSION ---------- @@ -45,7 +81,7 @@ One way to do it is to pull master into the topic branch: ------------ $ git checkout topic - $ git pull . master + $ git merge master o---*---o---+ topic / / @@ -67,10 +103,10 @@ in which case the final commit graph would look like this: ------------ $ git checkout topic - $ git pull . master + $ git merge master $ ... work on both topic and master branches $ git checkout master - $ git pull . topic + $ git merge topic o---*---o---+---o---o topic / / \ @@ -90,11 +126,11 @@ top of the tip before the test merge: ------------ $ git checkout topic - $ git pull . master + $ git merge master $ git reset --hard HEAD^ ;# rewind the test merge $ ... work on both topic and master branches $ git checkout master - $ git pull . topic + $ git merge topic o---*---o-------o---o topic / \ @@ -127,8 +163,7 @@ If this three-way merge resolves cleanly, the result is written out to your working tree file, so you would not have to manually resolve it. Note that `git-rerere` leaves the index file alone, so you still need to do the final sanity checks with `git diff` -(or `git diff -c`) and `git update-index` when you are -satisfied. +(or `git diff -c`) and `git add` when you are satisfied. As a convenience measure, `git-merge` automatically invokes `git-rerere` when it exits with a failed automerge, which @@ -166,30 +201,6 @@ would conflict the same way the test merge you resolved earlier. `git-rerere` is run by `git rebase` to help you resolve this conflict. -COMMANDS --------- - -Normally, git-rerere is run without arguments or user-intervention. -However, it has several commands that allow it to interact with -its working state. - -'clear':: - -This resets the metadata used by rerere if a merge resolution is to be -is aborted. Calling gitlink:git-am[1] --skip or gitlink:git-rebase[1] -[--skip|--abort] will automatcally invoke this command. - -'diff':: - -This displays diffs for the current state of the resolution. It is -useful for tracking what has changed while the user is resolving -conflicts. Additional arguments are passed directly to the system -diff(1) command installed in PATH. - -'status':: - -Like diff, but this only prints the filenames that will be tracked -for resolutions. Author ------