OSDN Git Service

f0324260d7de7d8db4654a878eea76561f38c1b9
[tortoisegit/TortoiseGitJp.git] / doc / source / en / TortoiseGit / tsvn_dug / dug_checkout.xml
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!DOCTYPE sect1 SYSTEM "../../../dtd/dblite.dtd">\r
3 <sect1 id="tsvn-dug-checkout">\r
4         <title>Checking Out A Working Copy(Switch to version)</title>\r
5         <indexterm>\r
6                 <primary>checkout</primary>\r
7         </indexterm>\r
8         <indexterm>\r
9                 <primary>Switch</primary>\r
10         </indexterm>\r
11         <indexterm>\r
12                 <primary>create working copy</primary>\r
13         </indexterm>\r
14         <?dbhh topicname="HIDD_CHECKOUT"?>\r
15         <para>\r
16                 To obtain a special version working copy you need to do a <firstterm>checkout</firstterm>\r
17                 from a local repository.\r
18         </para>\r
19         <para>\r
20                 Select a git repository directory in windows explorer\r
21                 <action>Right click</action> to pop up the\r
22                 context menu and select the command\r
23                 <menuchoice>\r
24                         <guimenu>TortoiseGit</guimenu>\r
25                         <guimenuitem>Switch\Checkout...</guimenuitem>\r
26                 </menuchoice>,\r
27                 which brings up the following dialog box:\r
28                 <figure id="tsvn-dug-checkout-dia-1">\r
29                         <title>The Checkout dialog</title>\r
30                         <graphic fileref="../images/SwitchCheckOut.png"/>\r
31                 </figure>\r
32                 If you enter a branch name at <guilabel>Create New Branch</guilabel>, new branch created and switch to new branchs.\r
33         </para>\r
34         <!--\r
35         <sect2 id="tsvn-dug-checkout-depth">\r
36                 <title>Checkout Depth</title>\r
37                 <para>\r
38                         You can choose the <firstterm>depth</firstterm> you want to checkout,\r
39                         which allows you to specify the depth of recursion into child folders.\r
40                         If you want just a few sections of a large tree, You can checkout\r
41                         the top level folder only, then update selected folders recursively.\r
42                         <variablelist>\r
43                                 <varlistentry>\r
44                                         <term>Fully recursive</term>\r
45                                         <listitem>\r
46                                                 <para>\r
47                                                         Checkout the entire tree, including all child folders\r
48                                                         and sub-folders.\r
49                                                 </para>\r
50                                         </listitem>\r
51                                 </varlistentry>\r
52                                 <varlistentry>\r
53                                         <term>Immediate children, including folders</term>\r
54                                         <listitem>\r
55                                                 <para>\r
56                                                         Checkout the specified directory, including all files\r
57                                                         and child folders, but do not populate the child folders.\r
58                                                 </para>\r
59                                         </listitem>\r
60                                 </varlistentry>\r
61                                 <varlistentry>\r
62                                         <term>Only file children</term>\r
63                                         <listitem>\r
64                                                 <para>\r
65                                                         Checkout the specified directory, including all files\r
66                                                         but do not checkout any child folders.\r
67                                                 </para>\r
68                                         </listitem>\r
69                                 </varlistentry>\r
70                                 <varlistentry>\r
71                                         <term>Only this item</term>\r
72                                         <listitem>\r
73                                                 <para>\r
74                                                         Checkout the directory only. Do not populate it with\r
75                                                         files or child folders.\r
76                                                 </para>\r
77                                         </listitem>\r
78                                 </varlistentry>\r
79                                 <varlistentry>\r
80                                         <term>Working copy</term>\r
81                                         <listitem>\r
82                                                 <para>\r
83                                                         Retain the depth specified in the working copy. This\r
84                                                         option is not used in the checkout dialog, but it is\r
85                                                         the default in all other dialogs which have a depth\r
86                                                         setting.\r
87                                                 </para>\r
88                                         </listitem>\r
89                                 </varlistentry>\r
90                         </variablelist>\r
91                 </para>\r
92                 <para>\r
93                         If you check out a sparse working copy (i.e., by choosing something other\r
94                         than <literal>fully recursive</literal> for the checkout depth), you can\r
95                         fetch additional sub-folders by using the repository browser\r
96                         (<xref linkend="tsvn-dug-repobrowser" />) or the check for modifications dialog\r
97                         (<xref linkend="tsvn-dug-wcstatus-2" />).\r
98                 </para>\r
99                 <para>\r
100                         In the repository browser,\r
101                         <action>Right click</action> on the checked out folder, then use\r
102                         <menuchoice>\r
103                                 <guimenu>TortoiseGit</guimenu>\r
104                                 <guimenuitem>Repo-Browser</guimenuitem>\r
105                         </menuchoice>\r
106                         to bring up the repository browser. Find the sub-folder you would like\r
107                         to add to your working copy, then use\r
108                         <menuchoice>\r
109                                 <guimenu>Context menu</guimenu>\r
110                                 <guimenuitem>Update item to revision...</guimenuitem>\r
111                         </menuchoice>\r
112                         That menu will only be visible if the selected item does not exist yet\r
113                         in your working copy, but the parent item does exist.\r
114                 </para>\r
115                 <para>\r
116                         In the check for modifications dialog, first click on the button\r
117                         <guibutton>Check repository</guibutton>. The dialog will show all\r
118                         the files and folders which are in the repository but which you\r
119                         have not checked out as <literal>remotely added</literal>.\r
120                         <action>Right click</action> on the folder(s) you would like to add\r
121                         to your working copy, then use\r
122                         <menuchoice>\r
123                                 <guimenu>Context menu</guimenu>\r
124                                 <guimenuitem>Update</guimenuitem>\r
125                         </menuchoice>.\r
126                 </para>\r
127                 <para>\r
128                         This feature is very useful when you only want to checkout parts of a\r
129                         large tree, but you want the convenience of updating a single working\r
130                         copy. Suppose you have a large tree which has sub-folders\r
131                         <literal>Project01</literal> to <literal>Project99</literal>,\r
132                         and you only want to checkout\r
133                         <literal>Project03</literal>,\r
134                         <literal>Project25</literal> and\r
135                         <literal>Project76/SubProj</literal>.\r
136                         Use these steps:\r
137                 </para>\r
138                 <orderedlist>\r
139                         <listitem>\r
140                                 <para>\r
141                                         Checkout the parent folder with depth\r
142                                         <quote>Only this item</quote>\r
143                                         You now have an empty top level folder.\r
144                                 </para>\r
145                         </listitem>\r
146                         <listitem>\r
147                                 <para>\r
148                                         Select the new folder and use\r
149                                         <menuchoice>\r
150                                                 <guimenu>TortoiseGit</guimenu>\r
151                                                 <guimenuitem>Repo browser</guimenuitem>\r
152                                         </menuchoice>\r
153                                         to display the repository content.\r
154                                 </para>\r
155                         </listitem>\r
156                         <listitem>\r
157                                 <para>\r
158                                         Right click on <literal>Project03</literal> and\r
159                                         <menuchoice>\r
160                                                 <guimenu>Context menu</guimenu>\r
161                                                 <guimenuitem>Update item to revision...</guimenuitem>\r
162                                         </menuchoice>.\r
163                                         Keep the default settings and click on\r
164                                         <guibutton>OK</guibutton>. You now have\r
165                                         that folder fully populated.\r
166                                 </para>\r
167                                 <para>\r
168                                         Repeat the same process for <literal>Project25</literal>.\r
169                                 </para>\r
170                         </listitem>\r
171                         <listitem>\r
172                                 <para>\r
173                                         Navigate to <literal>Project76/SubProj</literal> and\r
174                                         do the same. This time note that the <literal>Project76</literal>\r
175                                         folder has no content except for <literal>SubProj</literal>,\r
176                                         which itself is fully populated. Git has created the\r
177                                         intermediate folders for you without populating them.\r
178                                 </para>\r
179                         </listitem>\r
180                 </orderedlist>\r
181                 <tip>\r
182                         <title>Working copy depth cannot be reduced</title>\r
183                         <para>\r
184                                 Once you have checked out a working copy to a particular\r
185                                 depth you can increase that depth later to get more content.\r
186                                 However you cannot reduce the depth again to remove content.\r
187                                 That feature may be added in a later version of Git.\r
188                         </para>\r
189                 </tip>\r
190                 <tip>\r
191                         <title>Using an older server</title>\r
192                         <para>\r
193                                 Pre-1.5 servers do not understand the working copy depth\r
194                                 request, so they cannot always deal with requests efficiently.\r
195                                 The command will still work, but an older server may send all\r
196                                 the data, leaving the client to filter out what is not required,\r
197                                 which may mean a lot of network traffic. If possible you should\r
198                                 upgrade your server to 1.5.\r
199                         </para>\r
200                 </tip>\r
201         </sect2>\r
202         -->\r
203         <!--\r
204         <para>\r
205                 If the project contains references to external projects which you do\r
206                 <emphasis>not</emphasis> want checked out at the same time, use the\r
207                 <guilabel>Omit externals</guilabel> checkbox.\r
208         </para>\r
209         -->\r
210         <important>\r
211                 <para>\r
212                         If you checkout\switch to <guilabel>Tags</guilabel> or <guilabel>Version</guilabel>\r
213                         Prefer you create new branch for it, otherwise you will work at "no branch".\r
214                 </para>\r
215         </important>\r
216         \r
217         <tip>\r
218                 <title>Exporting</title>\r
219                 <para>\r
220                         Sometimes you may want to create a local copy without any of those\r
221                         <filename>.git</filename> directories, e.g. to create a zipped\r
222                         tarball of your source.\r
223                         Read <xref linkend="tsvn-dug-export"/> to find out how to do that.\r
224                 </para>\r
225         </tip>\r
226 </sect1>\r