OSDN Git Service

Add Git official document to help
[tortoisegit/TortoiseGitJp.git] / doc / source / en / TortoiseGit / git_doc / git-symbolic-ref.html.xml
diff --git a/doc/source/en/TortoiseGit/git_doc/git-symbolic-ref.html.xml b/doc/source/en/TortoiseGit/git_doc/git-symbolic-ref.html.xml
new file mode 100644 (file)
index 0000000..16be403
--- /dev/null
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">\r
+\r
+<article lang="en" id="git-symbolic-ref(1)">\r
+<articleinfo>\r
+    <title>git-symbolic-ref(1)</title>\r
+        <indexterm>\r
+                <primary>git-symbolic-ref(1)</primary>\r
+        </indexterm>\r
+</articleinfo>\r
+<simplesect id="_name">\r
+<title>NAME</title>\r
+<simpara>git-symbolic-ref - Read and modify symbolic refs</simpara>\r
+</simplesect>\r
+<simplesect id="_synopsis">\r
+<title>SYNOPSIS</title>\r
+<simpara><emphasis>git symbolic-ref</emphasis> [-q] [-m &lt;reason&gt;] &lt;name&gt; [&lt;ref&gt;]</simpara>\r
+</simplesect>\r
+<simplesect id="_description">\r
+<title>DESCRIPTION</title>\r
+<simpara>Given one argument, reads which branch head the given symbolic\r
+ref refers to and outputs its path, relative to the <literal>.git/</literal>\r
+directory.  Typically you would give <literal>HEAD</literal> as the &lt;name&gt;\r
+argument to see on which branch your working tree is on.</simpara>\r
+<simpara>Give two arguments, create or update a symbolic ref &lt;name&gt; to\r
+point at the given branch &lt;ref&gt;.</simpara>\r
+<simpara>A symbolic ref is a regular file that stores a string that\r
+begins with <literal>ref: refs/</literal>.  For example, your <literal>.git/HEAD</literal> is\r
+a regular file whose contents is <literal>ref: refs/heads/master</literal>.</simpara>\r
+</simplesect>\r
+<simplesect id="_options">\r
+<title>OPTIONS</title>\r
+<variablelist>\r
+<varlistentry>\r
+<term>\r
+-q\r
+</term>\r
+<term>\r
+--quiet\r
+</term>\r
+<listitem>\r
+<simpara>\r
+        Do not issue an error message if the &lt;name&gt; is not a\r
+        symbolic ref but a detached HEAD; instead exit with\r
+        non-zero status silently.\r
+</simpara>\r
+</listitem>\r
+</varlistentry>\r
+<varlistentry>\r
+<term>\r
+-m\r
+</term>\r
+<listitem>\r
+<simpara>\r
+        Update the reflog for &lt;name&gt; with &lt;reason&gt;.  This is valid only\r
+        when creating or updating a symbolic ref.\r
+</simpara>\r
+</listitem>\r
+</varlistentry>\r
+</variablelist>\r
+</simplesect>\r
+<simplesect id="_notes">\r
+<title>NOTES</title>\r
+<simpara>In the past, <literal>.git/HEAD</literal> was a symbolic link pointing at\r
+<literal>refs/heads/master</literal>.  When we wanted to switch to another branch,\r
+we did <literal>ln -sf refs/heads/newbranch .git/HEAD</literal>, and when we wanted\r
+to find out which branch we are on, we did <literal>readlink .git/HEAD</literal>.\r
+This was fine, and internally that is what still happens by\r
+default, but on platforms that do not have working symlinks,\r
+or that do not have the <literal>readlink(1)</literal> command, this was a bit\r
+cumbersome.  On some platforms, <literal>ln -sf</literal> does not even work as\r
+advertised (horrors).  Therefore symbolic links are now deprecated\r
+and symbolic refs are used by default.</simpara>\r
+<simpara><emphasis>git-symbolic-ref</emphasis> will exit with status 0 if the contents of the\r
+symbolic ref were printed correctly, with status 1 if the requested\r
+name is not a symbolic ref, or 128 if another error occurs.</simpara>\r
+</simplesect>\r
+<simplesect id="_author">\r
+<title>Author</title>\r
+<simpara>Written by Junio C Hamano &lt;<ulink url="mailto:gitster@pobox.com">gitster@pobox.com</ulink>&gt;</simpara>\r
+</simplesect>\r
+<simplesect id="_git">\r
+<title>GIT</title>\r
+<simpara>Part of the <xref linkend="git(1)"/> suite</simpara>\r
+</simplesect>\r
+</article>\r