1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE sect1 SYSTEM "../../../dtd/dblite.dtd">
\r
3 <sect1 id="tsvn-dug-update">
\r
4 <title>Update Your Working Copy With Changes From Others</title>
\r
6 <primary>update</primary>
\r
9 <primary>fetch changes</primary>
\r
12 <figure id="tsvn-dug-update-dia-1">
\r
13 <title>Progress dialog showing finished update</title>
\r
14 <graphic fileref="../images/UpdateFinished.png"/>
\r
16 Periodically, you should ensure that changes done by others get
\r
17 incorporated in your local working copy. The process of
\r
18 getting changes from the server to your local copy is
\r
19 known as <emphasis>updating</emphasis>. Updating may be done on
\r
20 single files, a set of selected files, or recursively on
\r
21 entire directory hierarchies. To update, select the files
\r
22 and/or directories you want, <action>right click</action> and select
\r
24 <guimenu>TortoiseGit</guimenu>
\r
25 <guimenuitem>Update</guimenuitem>
\r
27 in the explorer context menu. A window will pop up displaying the
\r
28 progress of the update as it runs.
\r
29 Changes done by others will be merged into your files,
\r
30 keeping any changes you may have done to the same files.
\r
31 The repository is <emphasis>not</emphasis> affected by an update.
\r
34 The progress dialog uses colour coding to highlight different
\r
41 New item added to your WC.
\r
46 <term>Dark red</term>
\r
49 Redundant item deleted from your WC,
\r
50 or missing item replaced in your WC.
\r
58 Changes from repository successfully merged with your
\r
64 <term>Bright red</term>
\r
67 Changes from repository merged with local changes,
\r
68 resulting in conflicts which you need to resolve.
\r
76 Unchanged item in your WC updated with newer version
\r
77 from the repository.
\r
84 This is the default colour scheme, but you can customise those colours
\r
85 using the settings dialog.
\r
86 Read <xref linkend="tsvn-dug-settings-colours"/> for more information.
\r
89 If you get any <emphasis>conflicts</emphasis> during an update (this
\r
90 can happen if others changed the same lines in the same file as
\r
91 you did and those changes don't match) then the dialog shows those
\r
92 conflicts in red. You can <action>double click</action> on these lines
\r
93 to start the external merge tool to resolve the conflicts.
\r
96 When the update is complete, the progress dialog shows a summary of the
\r
97 number of items updated, added, removed, conflicted, etc. below
\r
98 the file list. This summary information can be copied to the clipboard
\r
99 using <keycap>Ctrl+C</keycap>.
\r
101 <?dbhh topicname="HIDD_UPDATE"?>
\r
103 The standard Update command has no options and just updates your
\r
104 working copy to the HEAD revision of the repository, which is the
\r
105 most common use case. If you want more control over the update
\r
106 process, you should use
\r
108 <guimenu>TortoiseGit</guimenu>
\r
109 <guimenuitem>Update to Revision...</guimenuitem>
\r
110 </menuchoice> instead.
\r
111 This allows you to update your working copy to a specific
\r
112 revision, not only to the most recent one.
\r
113 Suppose your working copy is at revision 100, but you want it
\r
114 to reflect the state which it had in revision 50 -
\r
115 then simply update to revision 50.
\r
116 In the same dialog you can also choose the <firstterm>depth</firstterm>
\r
117 at which to update the current folder. The terms used are described
\r
118 in <xref linkend="tsvn-dug-checkout-depth"/>. The default depth is
\r
119 <guilabel>Working copy</guilabel>, which preserves the existing depth setting.
\r
120 You can also choose whether to ignore any external projects in the update
\r
121 (i.e. projects referenced using <literal>svn:externals</literal>).
\r
125 If you update a file or folder to a specific revision, you should not
\r
126 make changes to those files. You will get <quote>out of date</quote>
\r
127 error messages when you try to commit them!
\r
128 If you want to undo changes to a file and start afresh from an earlier
\r
129 revision, you can rollback to a previous revision from the revision log
\r
130 dialog. Take a look at <xref linkend="tsvn-howto-rollback"/> for
\r
131 further instructions, and alternative methods.
\r
136 <guimenuitem>Update to Revision</guimenuitem>
\r
138 can occasionally be useful to see what your project looked like at
\r
139 some earlier point in its history.
\r
140 But in general, updating individual files to an earlier revision is
\r
141 not a good idea as it leaves your working copy in an inconsistent
\r
142 state. If the file you are updating has changed name, you may even
\r
143 find that the file just disappears from your working copy because
\r
144 no file of that name existed in the earlier revision. You should
\r
145 also note that the item will show a normal green overlay, so it is
\r
146 indistinguishable from files which are up-to-date.
\r
149 If you simply want a local copy of an old version of a file it is
\r
152 <guimenu>Context Menu</guimenu>
\r
153 <guimenuitem>Save revision to...</guimenuitem>
\r
155 command from the log dialog for that file.
\r
158 <title>Multiple Files/Folders</title>
\r
160 If you select multiple files and folders in the explorer and then select
\r
162 <guimenuitem>Update</guimenuitem>
\r
164 all of those files/folders
\r
165 are updated one by one. TortoiseGit makes sure that all files/folders
\r
166 which are from the same repository are updated to the exact same
\r
167 revision! Even if between those updates another commit occurred.
\r
171 <title>Local File Already Exists</title>
\r
173 Sometimes when you try to update, the update fails with a message to
\r
174 say that there is already a local file of the same name. This typically
\r
175 happens when Git tries to checkout a newly versioned file, and finds
\r
176 that an unversioned file of the same name already exists in your working
\r
177 folder. Git will never overwrite an unversioned file - it might
\r
178 contain something you are working on, which coincidentally has the same
\r
179 filename as another developer has used for his newly committed file.
\r
182 If you get this error message, the solution is simply to rename the local
\r
183 unversioned file. After completing the update, you can check whether
\r
184 the renamed file is still needed.
\r
187 If you keep getting error messages, use
\r
189 <guimenu>TortoiseGit</guimenu>
\r
190 <guimenuitem>Check for Modifications</guimenuitem>
\r
192 instead to list all the problem files. That way you can deal with them
\r