aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorCharles Plessy <plessy@debian.org>2011-03-21 11:19:58 +0900
committerGuido Günther <agx@sigxcpu.org>2011-03-21 14:22:16 +0100
commit0095808588283b8274aeef1a7670d80ef71438e2 (patch)
treed22b283a20bdcca33cec4eb8c6e083f3172141f8 /docs
parentc9f1e1e254287eca5ae01ff5ddea4633bd5c5014 (diff)
docs: Easier to remember commands to create orphan upstream branch.
Closes; #619084 Signed-off-by: Guido Günther <agx@sigxcpu.org>
Diffstat (limited to 'docs')
-rw-r--r--docs/chapters/import.sgml7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/chapters/import.sgml b/docs/chapters/import.sgml
index c9893178..c4a5f1fc 100644
--- a/docs/chapters/import.sgml
+++ b/docs/chapters/import.sgml
@@ -142,6 +142,13 @@ EOF
mergeWithUpstream was set for svn-buildpackage), you can create an empty
upstream branch with the following commands:
<screen>
+ <command>git checkout</command> <option>--orphan</option> <replaceable>upstream</replaceable>
+ <command>git rm</command> <option>-rf</option> <replaceable>.</replaceable>
+ <command>git commit</command> <option>--allow-empty</option> <option>-m</option> <replaceable>'Initial upstream branch.'</replaceable>
+ <command>git checkout</command> <option>-f</option> <replaceable>master</replaceable>
+</screen>
+ With Git versions lower than 1.7.2.3, the commands are slightly more complicated:
+<screen>
<command>git symbolic-ref</command> <replaceable>HEAD</replaceable> <replaceable>refs/heads/upstream</replaceable>
<command>git rm</command> <option>--cached</option> <option>-r</option> <replaceable>.</replaceable>
<command>git commit</command> <option>--allow-empty</option> <option>-m</option> <replaceable>'Initial upstream branch.'</replaceable>