X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=Documentation%2Fgit-update-ref.txt;h=9639f705afafab6fcf0cd21ad2693627ab42f66d;hb=48c250a121a425a1860226b6a7061aecfbab5246;hp=7f7e3d197bafbbb2efe610096b0cad6901488be5;hpb=afce435000030e3ad076ef1dd413e0fa314cdcbb;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: