<th width="890" align="center" valign="middle"> Git User Guide</th>
</tr>
</table>
<table width="892" border="0">
<tr>
<td width="886">We will use <span>git</span> which is a distributed version control and source code management system to submit our code, here is the submission method.</td>
<td><p >Download <span>msysgit</span> from <a href="http://code.google.com/p/msysgit">http://code.google.com/p/msysgit</a>, the version we have used is </p>
<td align="left"><p >Please tick "<span>Checkout as-is</span>" and "<span>commit as-is</span>" options during installation so git does not modify the line feed style. Other options you can use the default settings.</p></td>
<p>Download <span>TortoiseGit</span> from <a href="http://code.google.com/p/tortoisegit/" >http://code.google.com/p/tortoisegit/</a>, the version we have used is </p>
<p>Tortoisegit-1.6.5.0-32bit.msi.</p>
<p>Please tick "TortoisePLink" option during installation.</p>
<p>You can start using Git when you complete the installation.</p></td>
<p>You can create a branch with method that right-click the "TortoiseGit" in the directory and check the "Create Branch… " option.</p></td>
<p>User name and email are used to set your own user name and contact information( user.name and user.email must be completed because these will be used when submitting the repository, the name and email must be the same with login name and email you registed in the forge.trustie.net). </p>
<p>Then you can customize the "Context Menu":</p>
<p>Please check the "<span>Clone</span>","<span>Sync</span>" and "<span>Commit</span>" options in the "<span>Context Menu</span>",</p>
<p>check the "<span>Import Svn Ignore</span>", "<span>Show Reflog</span>", "<span>Browse References</span>", "<span>Stash Apply</span>" and "<span>Submodule Sync</span>" in the "<span>Set Extend Menu Item</span>".</p></td>
<p>Create a new repository by two ways, here we go </p>
<p><span>(a) </span>You can create a repository by right-click in the folder and select "Git Create repository here". Uncheck any options in the new window, instead of it please click "OK".</p>
<p>After completed these operation, you can see there is a hidden directory ( <span>.git </span>) in the workspace and this hidden directory is the git repository. </p>
<p><span>(b)</span> Clone a exist version from the remote server to local: right-click in the folder and select " Git Clone.." and fill in the URL where you had clone from.</p></td>
<p> Right-click in the folder and select Git Commit -> "<span>master</span>"… , then fill in the "Message" and check the " <span> Whole Project </span> " option so that the whole information of the project can commit.</p>
<p>For example:</p>
<p>Create a new file in the workspace named "file1.txt", commit it, and then creat a new folder in the workspace named "dir1", after that create a new file again, but this file is in the folder dir1, named "file2.txt". After that select "Git Commit", then file1 and dir1 can be joined together.</p></td>
<p>You can create a new branch by right-click in the folder and select TortoiseGit -> "<span> create Branch… </span>".</p>
<p>You will switch to the new branch when you check <span>"Switch to new branch" </span>option.</p>
<p>For example:</p>
<p>Create a new file in the workspace named "file3.txt", commit it. And you can switch to the "master" by select the "Switch/Checkout..." in the "TortoiseGit".</p></td>
<p>You can view the situation of the branch by right-click in the folder and select TortoiseGit -> "<span> Show log</span>". Even you can also modify the log in it. And you can view all the branch's situation by check the " <span>All Branches </span> " option.</p>
<p>In the "Message" colume, <span3>branch</span3> is
<span3>green</span3>
and the <span4>current branch</span4> is <span4>red</span4>
<p>You can select two version in the same time by press "shift", and you can compare the different between two version by right-click the " <span>Compare revisions</span> ".</p></td>
<p>First, you should switch to the "master", then righr-click on it and select TortoiseGit-> "<span>Merge</span>" so that the branch can merge into the main version.</p></td>
<p>Git provides a function named <span>Stash </span>to temporarily store the revised programs. When you revise some programs but still do not want to commit them, you can stash these revised programs and pop them if you need them then.</p>
<p><span>(b) </span>Ignore Files</p>
<p>The editor will generate some .bak files after editing. If you do not want to add these .bak files to the repository you can select the ".bak" file and check the "<span>*.bak</span>" in the " <span>Add to ignore list</span>". Then the .bak files will not be commited.<br />