X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-update-ref.txt;h=9639f705afafab6fcf0cd21ad2693627ab42f66d;hb=73bae1dc468734bad3ff7d1b8e93e7ac5f9d3dff;hp=7f7e3d197bafbbb2efe610096b0cad6901488be5;hpb=9dc784a970ba5cc3871f7244c6bf6a823754f0a0;p=git.git diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt index 7f7e3d197..9639f705a 100644 --- a/Documentation/git-update-ref.txt +++ b/Documentation/git-update-ref.txt @@ -7,18 +7,18 @@ git-update-ref - Update the object name stored in a ref safely SYNOPSIS -------- -'git-update-ref' [-m ] (-d | [--no-deref] []) +'git update-ref' [-m ] (-d [] | [--no-deref] []) DESCRIPTION ----------- Given two arguments, stores the in the , possibly -dereferencing the symbolic refs. E.g. `git-update-ref HEAD +dereferencing the symbolic refs. E.g. `git update-ref HEAD ` updates the current branch head to the new object. Given three arguments, stores the in the , possibly dereferencing the symbolic refs, after verifying that the current value of the matches . -E.g. `git-update-ref refs/heads/master ` +E.g. `git update-ref refs/heads/master ` updates the master branch head to only if its current value is . You can specify 40 "0" or an empty string as to make sure that the ref you are creating does @@ -41,7 +41,7 @@ the result of following the symbolic pointers. In general, using - git-update-ref HEAD "$head" + git update-ref HEAD "$head" should be a _lot_ safer than doing @@ -61,7 +61,7 @@ still contains . Logging Updates --------------- If config parameter "core.logAllRefUpdates" is true or the file -"$GIT_DIR/logs/" exists then `git-update-ref` will append +"$GIT_DIR/logs/" exists then `git update-ref` will append a line to the log file "$GIT_DIR/logs/" (dereferencing all symbolic refs before creating the log name) describing the change in ref value. Log lines are formatted as: