-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.html
102 lines (95 loc) · 3.43 KB
/
setup.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>RIT CS Git Tutorial | Setting up a repository</title>
<link rel="shortcut icon" href="Media/CSC_logo.ico">
<link rel="stylesheet" type="text/css" href="custom.css">
</head>
<body>
<!-- header -->
<div id="topbar">
<div class="barbutton">
<img height="40" src="Media/CSC_logo.PNG"/>
</div>
<div class="barbutton">
<a href="index.html">Home</a>
</div>
<div class="barbutton">
<a href="vocab.html">Vocab</a>
</div>
<div class="barbutton">
<a href="setup.html">Setup</a>
</div>
<div class="barbutton">
<a href="committing.html">Committing</a>
</div>
<div class="barbutton">
<a href="eclipse_setup.html">Eclipse and Git</a>
</div>
<div class="barbutton">
<a href="general.html">FAQ</a>
</div>
<div class="barbutton">
<img height="40" src="Media/git.png"/>
</div>
</div>
<!-- end header -->
<h1>Setting up a repository</h1>
<!-- ====================================================================== -->
<h2>Configuring your name and email</h2>
<div>
<p>Before using Git on any system for the first time,
it is a good idea to set your name and email address,
since Git will include this information in each commit message you author.
Follow these steps:
</p>
<ol>
<li>Set your name by using this command:
<pre>$ git config --global user.name "<Your Name>"</pre>
</li>
<li>Set your email as follows:
<pre>$ git config --global user.email <your_email_address></pre>
</li>
</ol>
</div>
<!-- ====================================================================== -->
<h2>If you plan to develop on the CS systems</h2>
<div>
<p>If you intend to write your code on the department's systems
(e.g. while connected via SSH),
all you need to do is initialize a standard Git repository.
To do this, follow these steps.
</p>
<ol>
<li>Make sure you've set your name and email,
as detailed in the above section.
To check, look for this information in the output of the command:
<pre>$ git config --global -l</pre>
</li>
<li>Move into the folder where you keep your work for the course,
for example by running the command:
<pre>$ cd ~/Courses/CS/CS1/Labs</pre>
</li>
<li>Create a repository in a new folder of your choice.
For instance, to create one called <code>Lab1</code>, run:
<pre>$ git init Lab1</pre>
</li>
<li>This should result in a message being printed in the terminal, eg:
<pre>Initialized empty Git repository in ~/Courses/CS/CS1/Labs/Lab1/.git/</pre>
(Note: the exact path may differ based on your exact setup!!)
</li>
<li>On the offchance that this message was not printed,
there is another way to check whether your repository was successfully created.
To do this, navigate into the new directory and list its contents with the following series of commands:
<pre>$ cd Lab1
$ ls -a</pre>
Now look for the hidden <code>.git</code> folder.
This folder identifies the directory as a Git repository.
If you see it, you know the <code>init</code> was successful!
</li>
</ol>
</div>
<!-- ====================================================================== -->
</body>
</html>