diff options
| author | Cameron McEfee <cameron@github.com> | 2011-02-28 14:26:03 -0800 |
|---|---|---|
| committer | Cameron McEfee <cameron@github.com> | 2011-02-28 14:26:03 -0800 |
| commit | 9daf8363660584647d2c38f5b1ce7c664db1d5cb (patch) | |
| tree | 389e49ee827fd235e9f255ccc325f3f696c3b8e7 /_posts | |
| parent | 57c3a33ebf173f06fe2e206c0dc3a2cf9aac3b4b (diff) | |
added more definitions/explanations
Diffstat (limited to '_posts')
| -rw-r--r-- | _posts/2011-02-15-linux-set-up-git.markdown | 20 | ||||
| -rw-r--r-- | _posts/2011-02-15-mac-set-up-git.markdown | 41 | ||||
| -rw-r--r-- | _posts/2011-02-15-win-set-up-git.markdown | 22 | ||||
| -rw-r--r-- | _posts/2011-02-16-create-a-repo.markdown | 50 | ||||
| -rw-r--r-- | _posts/2011-02-17-fork-a-repo.markdown | 27 | ||||
| -rw-r--r-- | _posts/2011-02-18-be-social.markdown | 6 |
6 files changed, 123 insertions, 43 deletions
diff --git a/_posts/2011-02-15-linux-set-up-git.markdown b/_posts/2011-02-15-linux-set-up-git.markdown index c4d34b2..3177929 100644 --- a/_posts/2011-02-15-linux-set-up-git.markdown +++ b/_posts/2011-02-15-linux-set-up-git.markdown @@ -4,7 +4,7 @@ title: Set Up Git (Linux) description: A quick guide to help you get started with Git --- -<span class="intro">If you’ve found yourself on this page, we’re assuming you’re brand new to Git and GitHub. This guide will walk you through setting both up, and explain a little about how everything works along the way. If you already have Git experience and just want the short version, read the <a href="http://help.github.com">technical walkthrough instead</a>.</span> +<span class="intro">If you’ve found yourself on this page, we’re assuming you’re brand new to Git and GitHub. This guide will walk you through the basics and explain a little bit about how everything works along the way.</span> ##<span>First:</span> Download and Install Git @@ -24,7 +24,7 @@ _*If you don’t already know what Git is, <a href="http://progit.org/bo <img src="/images/bootcamp/bootcamp_1_linux_install_4.jpg" width="558" height="173" alt="Click Apply" /> - If you don’t have a package manager like Synaptic, or you’d rather install the necessary git components from the command line, run the script below: + If you don’t have a package manager like Synaptic, or you’d rather install the necessary git components from the command line, you can alternatively run the script below: <pre class="terminal bootcamp"> <span class="codeline">$ sudo apt-get install git-core git-gui git-doc<span>Installs git-core, git-gui, and git-doc on your system</span></span> @@ -43,14 +43,14 @@ To make sure you generate a brand new key, you need to check if one already exis <div class="more-info"> <h4 class="compressed">Need a quick lesson about Terminal?</h4> <div class="more-content"> - <p>Code blocks like those on this page are part of a scripting language called Bash. To use Bash scripts, we need to use an application that comes with your Mac called Terminal.</p> + <p>Code blocks like those on this page are part of a scripting language called Bash. To use Bash scripts, we need to use an application that comes with Linux called Terminal.</p> <h4>Input</h4> <pre class="terminal bootcamp"> <span class="codeline">$ echo 'This is input text'<span>This tooltip tells you what's going on.</span></span> </pre> - <p>A line that begins with the dollar sign ($) indicates a line of Bash script you need to type. To enter it, type the text that follows the $, hitting the return key at the end of each line. You can hover your mouse over each line for an explanation of what the script is doing</p> + <p>A line that begins with the dollar sign ($) indicates a line of Bash script you need to type. To enter it, type the text that follows the $, hitting the return key at the end of each line. You can hover your mouse over each line for an explanation of what the script is doing.</p> <h4>Output</h4> <pre class="terminal bootcamp"> @@ -61,10 +61,10 @@ To make sure you generate a brand new key, you need to check if one already exis <h4>User Specific Input</h4> <pre class="terminal bootcamp"> - <span class="codeline">$ echo '<em>username</em>'<span>Outputs the text in the quote marks.</span></span> + <span class="codeline">$ echo '<em>username</em>'<span>Outputs the text in the quotation marks.</span></span> </pre> - <p>Areas of yellow text represent your own personal info, repos, etc. If it is part of an input ($) line, you should replace your it with your own info when you type it. If it is part of output text, it is just for your reference. It will automatically show your own info in Terminal</p> + <p>Areas of yellow text represent your own personal info, repos, etc. If it is part of an input ($) line, you should replace your it with your own info when you type it. If it is part of output text, it is just for your reference. It will automatically show your own info in Terminal.</p> <p><strong>Good to know</strong>: There will be times when you type code, hit return, and all you are given is another prompt. Some actions that you execute in Terminal don’t have any output. Don’t worry, if there is ever a problem with your code, Terminal will let you know.</p> @@ -84,12 +84,12 @@ To make sure you generate a brand new key, you need to check if one already exis 2. <span class="step-title">Backup and remove existing SSH keys.</span> - Since there is already an SSH directory you’ll want to back it up and remove it: + Since there is already an SSH directory you’ll want to back the old one up and remove it: <pre class="terminal bootcamp"> <span class="codeline">$ ls<span>Lists all the subdirectories in the current directory</span></span> <span class="bash-output">config id_rsa id_rsa.pub known_hosts</span> - <span class="codeline">$ mkdir key_backup<span>Makes a directory called "key_backup" in the current directory</span></span> + <span class="codeline">$ mkdir key_backup<span>makes a subdirectory called "key_backup" in the current directory</span></span> <span class="codeline">$ cp id_rsa* key_backup<span>Copies the contents of the id_rsa directory into key_backup directory</span></span> <span class="codeline">$ rm id_rsa*<span>Deletes the contents of the id_rsa directory</span></span> </pre> @@ -189,11 +189,11 @@ To make sure you generate a brand new key, you need to check if one already exis </pre> - Don’t worry, about the “failed” part. All you should about is that you see “You’ve successfully authenticated” + Don’t worry, about the “failed” part. All you should care about is that you see “You’ve successfully authenticated” ##<span>Then: </span> Set Up Your Info -Now that you have Git set up and your SSH keys entered in GitHub, it’s time to configure your personal info. +Now that you have Git set up and your SSH keys entered into GitHub, it’s time to configure your personal info. 1. <span class="step-title">Set your username and email.</span> diff --git a/_posts/2011-02-15-mac-set-up-git.markdown b/_posts/2011-02-15-mac-set-up-git.markdown index 50cb9e2..57b1ea1 100644 --- a/_posts/2011-02-15-mac-set-up-git.markdown +++ b/_posts/2011-02-15-mac-set-up-git.markdown @@ -4,7 +4,7 @@ title: Set Up Git (OSX) description: A quick guide to help you get started with Git --- -<span class="intro">If you’ve found yourself on this page, we’re assuming you’re brand new to Git and GitHub. This guide will walk you through setting both up, and explain a little about how everything works along the way. If you already have Git experience and just want the short version, read the <a href="http://help.github.com">technical walkthrough instead</a>.</span> +<span class="intro">If you’ve found yourself on this page, we’re assuming you’re brand new to Git and GitHub. This guide will walk you through the basics and explain a little bit about how everything works along the way.</span> ##<span>First:</span> Download and Install Git @@ -34,7 +34,7 @@ To make sure you generate a brand new key, you need to check if one already exis <span class="codeline">$ echo 'This is input text'<span>This tooltip tells you what's going on.</span></span> </pre> - <p>A line that begins with the dollar sign ($) indicates a line of Bash script you need to type. To enter it, type the text that follows the $, hitting the return key at the end of each line. You can hover your mouse over each line for an explanation of what the script is doing</p> + <p>A line that begins with the dollar sign ($) indicates a line of Bash script you need to type. To enter it, type the text that follows the $, hitting the return key at the end of each line. You can hover your mouse over each line for an explanation of what the script is doing.</p> <h4>Output</h4> <pre class="terminal bootcamp"> @@ -45,10 +45,10 @@ To make sure you generate a brand new key, you need to check if one already exis <h4>User Specific Input</h4> <pre class="terminal bootcamp"> - <span class="codeline">$ echo '<em>username</em>'<span>Outputs the text in the quote marks.</span></span> + <span class="codeline">$ echo '<em>username</em>'<span>Outputs the text in the quotation marks.</span></span> </pre> - <p>Areas of yellow text represent your own personal info, repos, etc. If it is part of an input ($) line, you should replace your it with your own info when you type it. If it is part of output text, it is just for your reference. It will automatically show your own info in Terminal</p> + <p>Areas of yellow text represent your own personal info, repos, etc. If it is part of an input ($) line, you should replace it with your own info when you type it. If it is part of output text, it is just for your reference. It will automatically show your own info in Terminal.</p> <p><strong>Good to know</strong>: There will be times when you type code, hit return, and all you are given is another prompt. Some actions that you execute in Terminal don’t have any output. Don’t worry, if there is ever a problem with your code, Terminal will let you know.</p> @@ -68,12 +68,12 @@ To make sure you generate a brand new key, you need to check if one already exis 2. <span class="step-title">Backup and remove existing SSH keys.</span> - Since there is already an SSH directory you’ll want to back it up and remove it: + Since there is already an SSH directory you’ll want to back the old one up and remove it: <pre class="terminal bootcamp"> <span class="codeline">$ ls<span>Lists all the subdirectories in the current directory</span></span> <span class="bash-output">config id_rsa id_rsa.pub known_hosts</span> - <span class="codeline">$ mkdir key_backup<span>Makes a directory called "key_backup" in the current directory</span></span> + <span class="codeline">$ mkdir key_backup<span>makes a subdirectory called "key_backup" in the current directory</span></span> <span class="codeline">$ cp id_rsa* key_backup<span>Copies the contents of the id_rsa directory into key_backup </span></span> <span class="codeline">$ rm id_rsa*<span>Deletes the contents of the id_rsa directory</span></span> </pre> @@ -173,22 +173,39 @@ To make sure you generate a brand new key, you need to check if one already exis </pre> - Don’t worry, about the “failed” part. All you should about is that you see “You’ve successfully authenticated” + Don’t worry, about the “failed” part. All you should care about is that you see “You’ve successfully authenticated” ##<span>Then: </span> Set Up Your Info -Now that you have Git set up and your SSH keys entered in GitHub, it’s time to configure your personal info. +Now that you have Git set up and your SSH keys entered into GitHub, it’s time to configure your personal info. 1. <span class="step-title">Set your username and email.</span> Git tracks who makes each commit by checking the user’s name and email. In addition, we use this info to associate your commits with your GitHub account. To set these, enter the code below, replacing the name and email with your own. The name should be your _actual name_, not your GitHub username. <pre class="terminal bootcamp"> - <span class="codeline">$ git config --global user.name "<em>Firstname Lastname</em>"<span>Sets the name of the user for all git instances on the system</span></span> - <span class="codeline">$ git config --global user.email "<em>your_email@youremail.com</em>"<span>Sets the email of the user for all git instances on the system</span></span> + <span class="codeline">$ git config --global user.name "<em>Firstname Lastname</em>"<span>Sets the name of the user for all git instances on the system</span></span> + <span class="codeline">$ git config --global user.email "<em>your_email@youremail.com</em>"<span>Sets the email of the user for all git instances on the system</span></span> </pre> + <div class="more-info"> + <h4 class="compressed">More about user info</h4> + <div class="more-content"> + <p> + The steps listed above show you how to set your user info globally. This means that no matter which repo you work in on your computer, you’ll be making commits as that user. If you find yourself needing to make commits with different user info for a specific repo (perhaps for work vs. personal projects), you will have to change the info in that repo itself. + </p> + <pre class="terminal bootcamp"> + <span class="codeline">$ cd <em>my_other_repo</em><span>Changes the working directory to the repo you need to switch info for</span></span> + <span class="codeline">$ git config user.name "<em>Different Name</em>"<span>Sets the user's name for this specific repo</span></span> + <span class="codeline">$ git config user.email "<em>differentemail@email.com</em>"<span>Sets the user's email for this specific repo</span></span> + </pre> + <p> + Now your commits will be “blamed” on (associated with) new user name and email whenever working in the specified repo. + </p> + </div> + </div> + 2. <span class="step-title">Set your GitHub token.</span> Some tools connect to GitHub without SSH. To use these tools properly you need to find and configure your API Token. @@ -200,8 +217,8 @@ Now that you have Git set up and your SSH keys entered in GitHub, it’s tim In Terminal, run the following code, using your GitHub username and token in place of the ones shown. <pre class="terminal bootcamp"> - <span class="codeline">$ git config --global github.user <em>username</em><span>Sets the GitHub username for all git instances on the system</span></span> - <span class="codeline">$ git config --global github.token <em>0123456789yourf0123456789token</em><span>Sets the GitHub token for all git instances on the system</span></span> + <span class="codeline">$ git config --global github.user <em>username</em><span>Sets the GitHub username for all git instances on the system</span></span> + <span class="codeline">$ git config --global github.token <em>0123456789yourf0123456789token</em><span>Sets the GitHub token for all git instances on the system</span></span> </pre> __*Note*__ If you ever change your GitHub password, a new token will be created and will need to be updated. diff --git a/_posts/2011-02-15-win-set-up-git.markdown b/_posts/2011-02-15-win-set-up-git.markdown index 3317093..2db5d8d 100644 --- a/_posts/2011-02-15-win-set-up-git.markdown +++ b/_posts/2011-02-15-win-set-up-git.markdown @@ -4,7 +4,7 @@ title: Set Up Git (Windows) description: A quick guide to help you get started with Git --- -<span class="intro">If you’ve found yourself on this page, we’re assuming you’re brand new to Git and GitHub. This guide will walk you through setting both up, and explain a little about how everything works along the way. If you already have Git experience and just want the short version, read the <a href="http://help.github.com">technical walkthrough instead</a>.</span> +<span class="intro">If you’ve found yourself on this page, we’re assuming you’re brand new to Git and GitHub. This guide will walk you through the basics and explain a little bit about how everything works along the way.</span> ##<span>First:</span> Download and Install Git @@ -40,14 +40,14 @@ To make sure you generate a brand new key, you need to check if one already exis <div class="more-info"> <h4 class="compressed">Need a quick lesson about Git Bash?</h4> <div class="more-content"> - <p>Code blocks like those on this page are part of a scripting language called Bash. To use Bash scripts, we need to use an application that comes with Linux called Terminal.</p> + <p>Code blocks like those on this page are part of a scripting language called Bash. To use Bash scripts, we need to use an application that was installed with Git called Git Bash.</p> <h4>Input</h4> <pre class="terminal bootcamp"> <span class="codeline">$ echo 'This is input text'<span>This tooltip tells you what's going on.</span></span> </pre> - <p>A line that begins with the dollar sign ($) indicates a line of Bash script you need to type. To enter it, type the text that follows the $, hitting the return key at the end of each line. You can hover your mouse over each line for an explanation of what the script is doing</p> + <p>A line that begins with the dollar sign ($) indicates a line of Bash script you need to type. To enter it, type the text that follows the $, hitting the return key at the end of each line. You can hover your mouse over each line for an explanation of what the script is doing.</p> <h4>Output</h4> <pre class="terminal bootcamp"> @@ -58,12 +58,12 @@ To make sure you generate a brand new key, you need to check if one already exis <h4>User Specific Input</h4> <pre class="terminal bootcamp"> - <span class="codeline">$ echo '<em>username</em>'<span>Outputs the text in the quote marks.</span></span> + <span class="codeline">$ echo '<em>username</em>'<span>Outputs the text in the quotation marks.</span></span> </pre> - <p>Areas of yellow text represent your own personal info, repos, etc. If it is part of an input ($) line, you should replace your it with your own info when you type it. If it is part of output text, it is just for your reference. It will automatically show your own info in Git Bash</p> + <p>Areas of yellow text represent your own personal info, repos, etc. If it is part of an input ($) line, you should replace it with your own info when you type it. If it is part of output text, it is just for your reference. It will automatically show your own info in Git Bash.</p> - <p><strong>Good to know</strong>: There will be times when you type code, hit return, and all you are given is another prompt. Some actions that you execute in the Git Bash don’t have any output. Don’t worry, if there is ever a problem with your code, Git Bash will let you know.</p> + <p><strong>Good to know</strong>: There will be times when you type code, hit return, and all you are given is another prompt. Some actions that you execute in Git Bash don’t have any output. Don’t worry, if there is ever a problem with your code, Git Bash will let you know.</p> <p><strong>Good to know</strong>: For security reasons, Git Bash will not display what you type when entering passwords. Just type your password and hit the return key.</p> </div> @@ -81,12 +81,12 @@ To make sure you generate a brand new key, you need to check if one already exis 2. <span class="step-title">Backup and remove existing SSH keys.</span> - Since there is already an SSH directory you’ll want to back it up and remove it: + Since there is already an SSH directory you’ll want to back the old one up and remove it: <pre class="terminal bootcamp"> <span class="codeline">$ ls<span>Lists all the subdirectories in the current directory</span></span> <span class="bash-output">config id_rsa id_rsa.pub known_hosts</span> - <span class="codeline">$ mkdir key_backup<span>Makes a directory called "key_backup" in the current directory</span></span> + <span class="codeline">$ mkdir key_backup<span>makes a subdirectory called "key_backup" in the current directory</span></span> <span class="codeline">$ cp id_rsa* key_backup<span>Copies the contents of the id_rsa directory into key_backup directory</span></span> <span class="codeline">$ rm id_rsa*<span>Deletes the contents of the id_rsa directory</span></span> </pre> @@ -134,7 +134,7 @@ To make sure you generate a brand new key, you need to check if one already exis On the GitHub site _Click “Account Settings”_ > _Click “SSH Public Keys”_ > _Click “Add another public key”_ - First, open the id_rsa.pub file with a text editor (Notepad will do just fine). This is your SSH key. __It’s important you copy your SSH key exactly as it is written without adding any newlines or whitespace.__ Now paste it into the “Key” field. + Open the id_rsa.pub file with a text editor (Notepad will do just fine). This is your SSH key. __It’s important you copy your SSH key exactly as it is written without adding any newlines or whitespace.__ Now paste it into the “Key” field. <img src="/images/bootcamp/bootcamp_1_ssh.jpg" width="558" height="402" alt="Paste your SSH Key" /> @@ -165,11 +165,11 @@ To make sure you generate a brand new key, you need to check if one already exis </pre> - Don’t worry, about the “failed” part. All you should about is that you see “You’ve successfully authenticated” + Don’t worry, about the “failed” part. All you should care about is that you see “You’ve successfully authenticated” ##<span>Then: </span> Set Up Your Info -Now that you have Git set up and your SSH keys entered in GitHub, it’s time to configure your personal info. +Now that you have Git set up and your SSH keys entered into GitHub, it’s time to configure your personal info. 1. <span class="step-title">Set your username and email.</span> diff --git a/_posts/2011-02-16-create-a-repo.markdown b/_posts/2011-02-16-create-a-repo.markdown index cba62d8..fb67672 100644 --- a/_posts/2011-02-16-create-a-repo.markdown +++ b/_posts/2011-02-16-create-a-repo.markdown @@ -6,11 +6,20 @@ categories: bootcamp main_category: bootcamp --- -<span class="intro">If you’ve found yourself on this page, we’re assuming you’re brand new to Git and GitHub. This guide will walk you through creating your first repo, creating a README file, and making your first commit.</span> +<span class="intro">If you’ve found yourself on this page, we’re assuming you’re brand new to Git and GitHub. This guide will walk you through the basics and explain a little bit about how everything works along the way.</span> ##<span>First:</span> Create A Repo -Every time you push your commits to GitHub, they get stored in a repository (a.k.a. “repo”) +Every time you make a commit with Git, it is stored in a repository (a.k.a. “repo”). To put your project up on GitHub, you’ll need to have a GitHub repository for it to live in. + +<div class="more-info"> + <h4 class="compressed">More about repositories</h4> + <div class="more-content"> + <p> + Git stores all of your project files in a <em>repository.</em> If you are able to view hidden files on your system, you’ll see a subdirectory called “.git” in the project directory where you run <code>git init</code>. This is where Git stores all of your commits, as well as everything else it needs. In addition to your local, you can also have remote repositories (like GitHub repos). Remote repositories are the same as your local repo, but stored on a different server or computer for easy collaboration, backup, and general awesomeness. + </p> + </div> +</div> 1. <span class="step-title">Create a new repo</span> @@ -28,6 +37,15 @@ Every time you push your commits to GitHub, they get stored in a repository (a.k While a README isn’t a required part of a GitHub repo, it is a good idea to have one. READMEs are a great place to describe your project or add some documentation such as how to install or use your project. +<div class="more-info"> + <h4 class="compressed">More about READMEs</h4> + <div class="more-content"> + <p> + If you include a file with the filename “README” in your repo, it will automatically be shown on your repo’s front page. Pretty cool, huh? GitHub supports a number of different README formats. The one in this tutorial will result in a basic text file but other formats like .markdown or .textile can be used to render HTML content like links and headers. For more info about the supported markup formats, check out the <a href="https://github.com/github/markup" target="_blank">github markup repo</a>. + </p> + </div> +</div> + 1. <span class="step-title">Create the README file</span> In the prompt, type the following code: @@ -37,14 +55,23 @@ While a README isn’t a required part of a GitHub repo, it is a good idea t <span class="codeline">$ cd ~/Hello-World<span>Changes the current working directory to your newly created directory</span></span> <span class="codeline">$ git init<span>Sets up the necessary Git files</span></span> <span class="bash-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 directory</span></span> + <span class="codeline">$ touch README<span>Creates a file called “README” in your Hello-World directory</span></span> </pre> - Open the new README file found in your Hello-World directory in a text editor and add the text “Hello World!.” When you are finished, save and close the file. + Open the new README file found in your Hello-World directory in a text editor and add the text “Hello World!” When you are finished, save and close the file. 2. <span class="step-title">Commit your README</span> - 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: + 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: + + <div class="more-info"> + <h4 class="compressed">More about commits</h4> + <div class="more-content"> + <p> + Think of a <em>commit</em> as a snapshot of your project —code, files, everything — at a particular point in time. More accurately, after your first commit, each subsequent commit is only a snapshot of your changes. For code files, this means it only takes a snapshot of the lines of code that have changed. For everything else like music or image files, it saves a new copy of the file. + </p> + </div> + </div> <pre class="terminal bootcamp"> <span class="codeline">$ git add README<span>Stages your README file, adding it to the list of files to be committed</span></span> @@ -53,6 +80,19 @@ While a README isn’t a required part of a GitHub repo, it is a good idea t The code above executes actions locally, meaning you still haven’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: + <div class="more-info"> + <h4 class="compressed">More about remotes</h4> + <div class="more-content"> + <p> + A <em>remote</em> is a repo stored on another computer, in this case on GitHub’s server. It is standard practice (and also the default in some cases) to give the name <code>origin</code> to the remote that points to your main offsite repo (for example, your GitHub repo). + </p> + <p> + Git supports multiple remotes. This is commonly used when forking a repo. + </p> + </div> + </div> + + <pre class="terminal bootcamp"> <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> diff --git a/_posts/2011-02-17-fork-a-repo.markdown b/_posts/2011-02-17-fork-a-repo.markdown index 8cc493a..507390d 100644 --- a/_posts/2011-02-17-fork-a-repo.markdown +++ b/_posts/2011-02-17-fork-a-repo.markdown @@ -6,11 +6,11 @@ categories: bootcamp main_category: bootcamp --- -<span class="intro">If you’ve found yourself on this page, we’re assuming you’re brand new to Git and GitHub. At some point you may want use another user’s project as the starting point for your own. This is known as “forking.”</span> +<span class="intro">If you’ve found yourself on this page, we’re assuming you’re brand new to Git and GitHub. This guide will walk you through the basics and explain a little bit about how everything works along the way.</span> ##<span>First:</span> Fork A Repo -For this tutorial, we’ll be using the <a href="https://github.com/octocat/Spoon-Knife" target="_blank">Spoon-Knife</a> project. +At some point you may find yourself wanting to contribute to someone else's project, or would like to use someone's project as the starting point for your own. This is known as “forking.” For this tutorial, we’ll be using the <a href="https://github.com/octocat/Spoon-Knife" target="_blank">Spoon-Knife</a> project. 1. <span class="step-title">Fork the “Spoon-Knife ” repo</span> @@ -32,7 +32,19 @@ You’ve successfully forked the Spoon-Knife repo, but so far it only exists 2. <span class="step-title">Configure remotes</span> - Each repo has a default remote called `origin`. A “remote” is a repo stored on another computer, in this case on GitHub's server. The `origin` remote in your local repo points to your fork on GitHub, not the original repo it was forked from. To help you keep track of the original repo, you will add another remote named `upstream`: + When clone a repo, it has a default remote called `origin` that points to your fork on GitHub, not the original repo it was forked from. To keep track of the original repo, you need to add another remote named `upstream`: + + <div class="more-info"> + <h4 class="compressed">More about remotes</h4> + <div class="more-content"> + <p> + A <em>remote</em> is a repo stored on another computer, in this case on GitHub’s server. It is standard practice (and also the default in some cases) to give the name <code>origin</code> to the remote that points to your main offsite repo (for example, your GitHub repo). + </p> + <p> + Git supports multiple remotes. This is commonly used when forking a repo. + </p> + </div> + </div> <pre class="terminal bootcamp"> <span class="codeline">$ cd Spoon-Knife<span>Changes the active directory in the prompt to the newly cloned "Spoon-Knife" directory</span></span> @@ -48,6 +60,15 @@ You’ve successfully forked a repo, but get a load of these other cool thin Once you’ve made some commits to a forked repo and want to push it to your forked project, you do it the same way you would with a regular repo: + <div class="more-info"> + <h4 class="compressed">More about commits</h4> + <div class="more-content"> + <p> + Think of a <em>commit</em> as a snapshot of your project —code, files, everything — at a particular point in time. More accurately, after your first commit, each subsequent commit is only a snapshot of your changes. For code files, this means it only takes a snapshot of the lines of code that have changed. For everything else like music or image files, it saves a new copy of the file. + </p> + </div> + </div> + <pre class="terminal bootcamp"> <span class="codeline">$ git push origin master<span>Pushes commits to your remote repo stored on GitHub</span></span> </pre> diff --git a/_posts/2011-02-18-be-social.markdown b/_posts/2011-02-18-be-social.markdown index 14f55f8..75e45bd 100644 --- a/_posts/2011-02-18-be-social.markdown +++ b/_posts/2011-02-18-be-social.markdown @@ -6,10 +6,12 @@ categories: bootcamp main_category: bootcamp --- -<span class="intro">If you’ve found yourself on this page, we’re assuming you’re brand new to Git and GitHub. Being social is one of the key features of GitHub. Open source projects become even more awesome when people come together to collaborate and we are happy to help that happen!</span> +<span class="intro">If you’ve found yourself on this page, we’re assuming you’re brand new to Git and GitHub. This guide will walk you through the basics and explain a little bit about how everything works along the way.</span> ##<span>First:</span> Follow A Friend +One of the great features on GitHub is the ability to see what other people are working on and who they are connecting with. When you follow someone, you will get notifications on your dashboard about their GitHub activity. + 1. <span class="step-title">Pick a friend.</span> Why not follow one of these cool people? @@ -44,7 +46,7 @@ main_category: bootcamp <img src="/images/bootcamp/bootcamp_4_follow.jpg" width="558" height="151" alt="Click “Follow" /> - Congratulations! You are now following a friend. Their activity on GitHub will now show up on your dashboard. + Congratulations! You are now following a friend. ##<span>Next:</span> Watch A Project |
