1 <?xml version="1.0" encoding="UTF-8"?>
\r
2 <!DOCTYPE sect1 SYSTEM "../../../dtd/dblite.dtd">
\r
3 <sect1 id="tgit-dug-add">
\r
4 <title>Adding New Files</title>
\r
6 <primary>add</primary>
\r
9 <primary>version new files</primary>
\r
11 <?dbhh topicname="HIDD_ADD"?>
\r
13 <figure id="tgit-dug-adding-dia-1">
\r
14 <title>Explorer context menu for unversioned files</title>
\r
15 <graphic fileref="../images/ContextMenuFileNoControl.png"/>
\r
17 If you created new files during
\r
18 your development process then you need to add them
\r
19 to source control too. Select the file(s) and/or NOT empty directory
\r
22 <guimenu>TortoiseGit</guimenu>
\r
23 <guimenuitem>Add</guimenuitem>
\r
27 After you added the files to source control
\r
28 the file appears with a <literal>added</literal> icon overlay which means you
\r
29 first have to commit (and push) your working tree to make those
\r
30 files available to other developers.
\r
31 Just adding a file does <emphasis>not</emphasis> affect any remote
\r
35 <title>Many Adds</title>
\r
37 You can also use the Add command on
\r
38 folders. In that case, the add dialog will show you all
\r
39 unversioned files inside that versioned folder.
\r
40 This helps if you have many new files and need to add
\r
45 <title>Empty directories</title>
\r
47 Git only tracks content and, thus, cannot version (empty) directories. If you
\r
48 need a directory to be automatically created on checkout, make sure at least one
\r
49 versioned file is in it (e.g. a placeholder file such as <filename>.gitkeep</filename> or <filename>.gitignore</filename>).
\r
53 To add files from outside your working tree you can use
\r
54 the drag-and-drop handler:
\r
58 select the files you want to add
\r
63 <action>right-drag</action> them
\r
64 to the new location inside the working tree
\r
69 release the right mouse button
\r
76 <guimenu>Context Menu</guimenu>
\r
77 <guimenuitem>Git Add copy and add files</guimenuitem>
\r
79 The files will then be copied to the working tree and
\r
80 added to version control.
\r
86 You can also add files within a working tree simply by (left-)dragging and
\r
87 dropping them onto the commit dialog.
\r
90 If you add a file by mistake, you can undo the addition
\r
91 before you commit using
\r
93 <guimenu>TortoiseGit</guimenu>
\r
94 <guimenuitem>Delete (keep local)...</guimenuitem>
\r
96 or <guimenuitem>Revert</guimenuitem>.
\r
99 <figure id="tgit-dug-addfinish-1">
\r
100 <title>Add finished</title>
\r
101 <graphic fileref="../images/AddFinish.png"/>
\r
103 After adding the files, you may commit by clicking the shortcut menu button.
\r
104 Additionally, there are options to mark the newly added files as executable / symlink.
\r
105 Remember to mark executable bit for files such as Unix shell script.
\r
106 This is to facilitate sharing repository with Linux / MacOS environment.
\r
109 You can find more information at <xref linkend="git-add(1)"/>
\r