OSDN Git Service

Add Git official document to help
[tortoisegit/TortoiseGitJp.git] / doc / source / en / TortoiseGit / git_doc / git-revert.html.xml
diff --git a/doc/source/en/TortoiseGit/git_doc/git-revert.html.xml b/doc/source/en/TortoiseGit/git_doc/git-revert.html.xml
new file mode 100644 (file)
index 0000000..e2bdf30
--- /dev/null
@@ -0,0 +1,146 @@
+<?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-revert(1)">\r
+<articleinfo>\r
+    <title>git-revert(1)</title>\r
+        <indexterm>\r
+                <primary>git-revert(1)</primary>\r
+        </indexterm>\r
+</articleinfo>\r
+<simplesect id="_name">\r
+<title>NAME</title>\r
+<simpara>git-revert - Revert an existing commit</simpara>\r
+</simplesect>\r
+<simplesect id="_synopsis">\r
+<title>SYNOPSIS</title>\r
+<simpara><emphasis>git revert</emphasis> [--edit | --no-edit] [-n] [-m parent-number] [-s] &lt;commit&gt;</simpara>\r
+</simplesect>\r
+<simplesect id="_description">\r
+<title>DESCRIPTION</title>\r
+<simpara>Given one existing commit, revert the change the patch introduces, and record a\r
+new commit that records it.  This requires your working tree to be clean (no\r
+modifications from the HEAD commit).</simpara>\r
+<simpara>Note: <emphasis>git revert</emphasis> is used to record a new commit to reverse the\r
+effect of an earlier commit (often a faulty one).  If you want to\r
+throw away all uncommitted changes in your working directory, you\r
+should see <xref linkend="git-reset(1)"/>, particularly the <emphasis>--hard</emphasis> option.  If\r
+you want to extract specific files as they were in another commit, you\r
+should see <xref linkend="git-checkout(1)"/>, specifically the <emphasis>git checkout\r
+&lt;commit&gt;&#8201;&#8212;&#8201;&lt;filename&gt;</emphasis> syntax.  Take care with these alternatives as\r
+both will discard uncommitted changes in your working directory.</simpara>\r
+</simplesect>\r
+<simplesect id="_options">\r
+<title>OPTIONS</title>\r
+<variablelist>\r
+<varlistentry>\r
+<term>\r
+&lt;commit&gt;\r
+</term>\r
+<listitem>\r
+<simpara>\r
+        Commit to revert.\r
+        For a more complete list of ways to spell commit names, see\r
+        "SPECIFYING REVISIONS" section in <xref linkend="git-rev-parse(1)"/>.\r
+</simpara>\r
+</listitem>\r
+</varlistentry>\r
+<varlistentry>\r
+<term>\r
+-e\r
+</term>\r
+<term>\r
+--edit\r
+</term>\r
+<listitem>\r
+<simpara>\r
+        With this option, <emphasis>git-revert</emphasis> will let you edit the commit\r
+        message prior to committing the revert. This is the default if\r
+        you run the command from a terminal.\r
+</simpara>\r
+</listitem>\r
+</varlistentry>\r
+<varlistentry>\r
+<term>\r
+-m parent-number\r
+</term>\r
+<term>\r
+--mainline parent-number\r
+</term>\r
+<listitem>\r
+<simpara>\r
+        Usually you cannot revert a merge because you do not know which\r
+        side of the merge should be considered the mainline.  This\r
+        option specifies the parent number (starting from 1) of\r
+        the mainline and allows revert to reverse the change\r
+        relative to the specified parent.\r
+</simpara>\r
+<simpara>Reverting a merge commit declares that you will never want the tree changes\r
+brought in by the merge.  As a result, later merges will only bring in tree\r
+changes introduced by commits that are not ancestors of the previously\r
+reverted merge.  This may or may not be what you want.</simpara>\r
+<simpara>See the <ulink url="howto/revert-a-faulty-merge.txt">revert-a-faulty-merge How-To</ulink> for\r
+more details.</simpara>\r
+</listitem>\r
+</varlistentry>\r
+<varlistentry>\r
+<term>\r
+--no-edit\r
+</term>\r
+<listitem>\r
+<simpara>\r
+        With this option, <emphasis>git-revert</emphasis> will not start the commit\r
+        message editor.\r
+</simpara>\r
+</listitem>\r
+</varlistentry>\r
+<varlistentry>\r
+<term>\r
+-n\r
+</term>\r
+<term>\r
+--no-commit\r
+</term>\r
+<listitem>\r
+<simpara>\r
+        Usually the command automatically creates a commit with\r
+        a commit log message stating which commit was\r
+        reverted.  This flag applies the change necessary\r
+        to revert the named commit to your working tree\r
+        and the index, but does not make the commit.  In addition,\r
+        when this option is used, your index does not have to match\r
+        the HEAD commit.  The revert is done against the\r
+        beginning state of your index.\r
+</simpara>\r
+<simpara>This is useful when reverting more than one commits'\r
+effect to your index in a row.</simpara>\r
+</listitem>\r
+</varlistentry>\r
+<varlistentry>\r
+<term>\r
+-s\r
+</term>\r
+<term>\r
+--signoff\r
+</term>\r
+<listitem>\r
+<simpara>\r
+        Add Signed-off-by line at the end of the commit message.\r
+</simpara>\r
+</listitem>\r
+</varlistentry>\r
+</variablelist>\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="_documentation">\r
+<title>Documentation</title>\r
+<simpara>Documentation by Junio C Hamano and the git-list &lt;<ulink url="mailto:git@vger.kernel.org">git@vger.kernel.org</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