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
6 <primary>checkout</primary>
\r
9 <primary>Switch</primary>
\r
12 <primary>create working copy</primary>
\r
14 <?dbhh topicname="HIDD_CHECKOUT"?>
\r
16 To obtain a special version working copy you need to do a <firstterm>checkout</firstterm>
\r
17 from a local repository.
\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
24 <guimenu>TortoiseGit</guimenu>
\r
25 <guimenuitem>Switch\Checkout...</guimenuitem>
\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
32 If you enter a branch name at <guilabel>Create New Branch</guilabel>, new branch created and switch to new branchs.
\r
35 <sect2 id="tsvn-dug-checkout-depth">
\r
36 <title>Checkout Depth</title>
\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
44 <term>Fully recursive</term>
\r
47 Checkout the entire tree, including all child folders
\r
53 <term>Immediate children, including folders</term>
\r
56 Checkout the specified directory, including all files
\r
57 and child folders, but do not populate the child folders.
\r
62 <term>Only file children</term>
\r
65 Checkout the specified directory, including all files
\r
66 but do not checkout any child folders.
\r
71 <term>Only this item</term>
\r
74 Checkout the directory only. Do not populate it with
\r
75 files or child folders.
\r
80 <term>Working copy</term>
\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
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
100 In the repository browser,
\r
101 <action>Right click</action> on the checked out folder, then use
\r
103 <guimenu>TortoiseGit</guimenu>
\r
104 <guimenuitem>Repo-Browser</guimenuitem>
\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
109 <guimenu>Context menu</guimenu>
\r
110 <guimenuitem>Update item to revision...</guimenuitem>
\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
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
123 <guimenu>Context menu</guimenu>
\r
124 <guimenuitem>Update</guimenuitem>
\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
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
148 Select the new folder and use
\r
150 <guimenu>TortoiseGit</guimenu>
\r
151 <guimenuitem>Repo browser</guimenuitem>
\r
153 to display the repository content.
\r
158 Right click on <literal>Project03</literal> and
\r
160 <guimenu>Context menu</guimenu>
\r
161 <guimenuitem>Update item to revision...</guimenuitem>
\r
163 Keep the default settings and click on
\r
164 <guibutton>OK</guibutton>. You now have
\r
165 that folder fully populated.
\r
168 Repeat the same process for <literal>Project25</literal>.
\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
182 <title>Working copy depth cannot be reduced</title>
\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
191 <title>Using an older server</title>
\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
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
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
218 <title>Exporting</title>
\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