summaryrefslogtreecommitdiff
path: root/_posts/2011-02-16-create-a-repo.markdown
diff options
context:
space:
mode:
Diffstat (limited to '_posts/2011-02-16-create-a-repo.markdown')
-rw-r--r--_posts/2011-02-16-create-a-repo.markdown22
1 files changed, 11 insertions, 11 deletions
diff --git a/_posts/2011-02-16-create-a-repo.markdown b/_posts/2011-02-16-create-a-repo.markdown
index 3cd470a..ac8af10 100644
--- a/_posts/2011-02-16-create-a-repo.markdown
+++ b/_posts/2011-02-16-create-a-repo.markdown
@@ -14,11 +14,11 @@ Every time you push your commits to GitHub, they get stored in a repository (a.k
1. <span class="step-title">Create a new repo</span>
- Click &ldquo;New Repository
+ Click &ldquo;New Repository.
<img src="/images/bootcamp/bootcamp_2_newrepo.jpg" width="558" height="291" alt="Click &ldquo;New Repository" />
- Fill out the information on this page. When you&rsquo;re done, click &ldquo;Create Repository&rdquo;
+ Fill out the information on this page. When you&rsquo;re done, click &ldquo;Create Repository.&rdquo;
<img src="/images/bootcamp/bootcamp_2_repoinfo.jpg" width="558" height="437" alt="Fill in the info" />
@@ -33,11 +33,11 @@ While a README isn&rsquo;t a required part of a GitHub repo, it is a good idea t
In the prompt, type the following code:
<pre class="terminal bootcamp">
- <span class="codeline">$ mkdir ~/Hello-World<span class="terminal-tooltip">Creates a folder for your project called "Hello-World" in your user folder</span></span>
- <span class="codeline">$ cd ~/Hello-World<span class="terminal-tooltip">Changes the active directory in the prompt to your newly created folder</span></span>
- <span class="codeline">$ git init<span class="terminal-tooltip">Sets up the necessary Git files</span></span>
- <span class="codeline terminal-output">Initialized empty Git repository in /Users/octocat/Hello-World/.git/</span>
- <span class="codeline">$ touch README<span class="terminal-tooltip">Creates a file called "README" in your Hello-World folder</span></span>
+ <span class="codeline">$ mkdir ~/Hello-World<span>Creates a folder for your project called "Hello-World" in your user folder</span></span>
+ <span class="codeline">$ cd ~/Hello-World<span>Changes the active directory in the prompt to your newly created folder</span></span>
+ <span class="codeline">$ git init<span>Sets up the necessary Git files</span></span>
+ <span class="terminal-output">Initialized empty Git repository in /Users/<em>your_user_directory</em>/Hello-World/.git/</span>
+ <span class="codeline">$ touch README<span>Creates a file called "README" in your Hello-World folder</span></span>
</pre>
Open the new README file found in your Hello-World folder in a text editor and add the text &ldquo;Hello World!.&rdquo; When you are finished, save and close the file.
@@ -47,15 +47,15 @@ While a README isn&rsquo;t a required part of a GitHub repo, it is a good idea t
Now that you have your README set up, it's time to commit it. A commit is essentially a snapshot of all the files in your project at a particular point in time. In the prompt, type the following code:
<pre class="terminal bootcamp">
- <span class="codeline">$ git add README<span class="terminal-tooltip">Stages your README file, adding it to the list of files to be committed</span></span>
- <span class="codeline">$ git commit -m 'first commit'<span class="terminal-tooltip"></span>Commits your files, adding the message "first commit"</span>
+ <span class="codeline">$ git add README<span>Stages your README file, adding it to the list of files to be committed</span></span>
+ <span class="codeline">$ git commit -m 'first commit'<span></span>Commits your files, adding the message "first commit"</span>
</pre>
The code above executes actions locally, meaning you still haven&rsquo;t done anything on GitHub yet. To connect your local repository to your GitHub account, you will need to set a remote for your repo and push your commits to it:
<pre class="terminal bootcamp">
- <span class="codeline">$ git remote add origin git@github.com:octocat/Hello-World.git<span class="terminal-tooltip">Sets the origin for the Hello-World repo</span></span>
- <span class="codeline">$ git push origin master<span class="terminal-tooltip"></span>Sends your commit to GitHub</span>
+ <span class="codeline">$ git remote add origin git@github.com:<em>username</em>/Hello-World.git<span>Sets the origin for the Hello-World repo</span></span>
+ <span class="codeline">$ git push origin master<span></span>Sends your commit to GitHub</span>
</pre>
Now if you look at your repository on GitHub, you will see your README has been added to it.