From 521fb3dc5de606114ac5cebbb654336492d7461f Mon Sep 17 00:00:00 2001 From: Cameron McEfee Date: Fri, 25 Feb 2011 13:26:21 -0800 Subject: commit before deleting the 'explain it' styles --- _posts/2011-02-15-linux-set-up-git.markdown | 147 ++++++++++++++---------- _posts/2011-02-15-mac-set-up-git.markdown | 148 +++++++++++++++---------- _posts/2011-02-15-set-up-git-redirect.markdown | 6 +- _posts/2011-02-15-win-set-up-git.markdown | 135 ++++++++++++++-------- _posts/2011-02-16-create-a-repo.markdown | 22 ++-- _posts/2011-02-17-fork-a-repo.markdown | 80 ++++++++++--- _posts/2011-02-18-be-social.markdown | 4 +- 7 files changed, 345 insertions(+), 197 deletions(-) (limited to '_posts') diff --git a/_posts/2011-02-15-linux-set-up-git.markdown b/_posts/2011-02-15-linux-set-up-git.markdown index 5f53caf..8b58ae6 100644 --- a/_posts/2011-02-15-linux-set-up-git.markdown +++ b/_posts/2011-02-15-linux-set-up-git.markdown @@ -28,119 +28,148 @@ _*If you don’t already know what Git is, -

Need a quick lesson about Terminal? -  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. A line that begins with the dollar sign ($) indicates a line of code you need to type. To enter it, type the text that follows the $, hitting the return key at the end of each line. If you see a line in an example that doesn’t begin with a $ (we’ve made them green in the bootcamp tutorials), that means it is a line of text that terminal has output for you to read and/or act upon. In the bootcamp examples, you can roll over the lines of Bash script for an explanation of what they do.

- - Good to know: 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 Terminal don’t have any output. Don’t worry, if there is ever a problem with your code, Terminal will let you know.

- - Good to know: For security reasons, Terminal will not display what you type when entering passwords. Just type your password and hit the return key. -
+ +   + +

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.

+ +

Input

+
+				$ echo 'This is input text'This tooltip tells you what's going on.
+			
+ +

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 to see what the script is doing

+ +

Output

+
+				$ This is output text.
+			
+ +

A line that does not begin with a $ is output text that is intended to give you information or tell you what to do next. We've colored output text green in these bootcamp tutorials.

+ +

User Specific Input

+
+				$ echo 'username'Outputs the text in the quote marks.
+			
+ +

Areas of yellow text represent your own personal info. 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

+ +

Good to know: 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 Terminal don’t have any output. Don’t worry, if there is ever a problem with your code, Terminal will let you know.

+ +

Good to know: For security reasons, Terminal will not display what you type when entering passwords. Just type your password and hit the return key.

+ + -

1. Check for SSH keys. Have an existing kepair? You can skip to Step 4. First, we need to check for existing ssh keys on your computer:
-	$ cd ~/.sshChecks to see if there is a folder named ".ssh" in you user directory
+	$ cd ~/.sshChecks to see if there is a folder named ".ssh" in you user directory
 	
-

Does it say "No such file or directory"?

-

No: Go to Step 2
Yes: Skip to Step 3 -

+ If it says “No such file or directory“ skip to __step 3__. Otherwise continue to __step 2__. + 2. Backup and remove existing SSH keys. Since there is already an SSH directory you’ll want to back it up and remove it:
-	$ lsLists all the subdirectories in the current directory
-	config  id_rsa  id_rsa.pub  known_hosts
-	$ mkdir key_backupMakes a folder called "key_backup" in the current directory
-	$ cp id_rsa* key_backupCopies the contents of the id_rsa folder into key_backup folder
-	$ rm id_rsa*Deletes the contents of the id_rsa folder
+	$ lsLists all the subdirectories in the current directory
+	config  id_rsa  id_rsa.pub  known_hosts
+	$ mkdir key_backupMakes a folder called "key_backup" in the current directory
+	$ cp id_rsa* key_backupCopies the contents of the id_rsa folder into key_backup folder
+	$ rm id_rsa*Deletes the contents of the id_rsa folder
 	
3. Generate a new SSH key. - To generate a new SSH key, enter the code below. When asked to enter a file in which to save the key, just press enter without typing anything. + To generate a new SSH key, enter the code below. We want the default settings so when asked to enter a file in which to save the key, just press enter.
-	$ ssh-keygen -t rsa -C "octocat@github.com"Creates a new ssh key using the provided email
-	Generating public/private rsa key pair.
-	Enter file in which to save the key (/home/octocat/.ssh/id_rsa):
-	Enter passphrase (empty for no passphrase):
-	Enter same passphrase again:
+	$ ssh-keygen -t rsa -C "user_name@username.com"Creates a new ssh key using the provided email
+	Generating public/private rsa key pair.
+	Enter file in which to save the key (/home/your_user_directory/.ssh/id_rsa):
+	
+ + Now you need to enter a passphrase. _[Why is this important?](../working-with-key-passphrases)_ + +
+	Enter passphrase (empty for no passphrase):
+	Enter same passphrase again:
 	
Which should give you something like this:
-	Your identification has been saved in /home/octocat/.ssh/id_rsa.
-	Your public key has been saved in /home/octocat/.ssh/id_rsa.pub.
-	The key fingerprint is:
-	01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db octocat@github.com
-	The key's randomart image is:
-	+--[ RSA 2048]----+
-	|     .+   +      |
-	|       = o O .   |
-	|        = * *    |
-	|       o = +     |
-	|      o S .      |
-	|     o o =       |
-	|      o . E      |
-	|                 |
-	|                 |
-	+-----------------+
+	Your identification has been saved in /home/your_user_directory/.ssh/id_rsa.
+	Your public key has been saved in /home/your_user_directory/.ssh/id_rsa.pub.
+	The key fingerprint is:
+	01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db user_name@username.com
+	The key's randomart image is:
+	+--[ RSA 2048]----+
+	|     .+   +      |
+	|       = o O .   |
+	|        = * *    |
+	|       o = +     |
+	|      o S .      |
+	|     o o =       |
+	|      o . E      |
+	|                 |
+	|                 |
+	+-----------------+
 	
4. Add your SSH key to GitHub. On the GitHub site _Click “Account Settings”_ > _Click “SSH Public Keys”_ > _Click “Add another public key”_ - It’s important you copy your SSH key exactly as it is written without adding any newlines or whitespace. To ensure this, run the following code to copy the key to your clipboard. + __It’s important you copy your SSH key exactly as it is written without adding any newlines or whitespace.__ To ensure this, run the following code to copy the key to your clipboard.
-	$ sudo apt-get install xclipDownloads and installs xclip
-	$ cat ~/.ssh/id_rsa.pub | xclip -sel clipCopies the contents of the id_rsa.pub file to your clipboard
+	$ sudo apt-get install xclipDownloads and installs xclip
+	$ cat ~/.ssh/id_rsa.pub | xclip -sel clipCopies the contents of the id_rsa.pub file to your clipboard
 	
- Now paste it into the “Key” field + Now paste it into the “Key” field. - Paste your SSH Key + Paste your SSH Key - Hit “Add Key” + Hit “Add Key.” 5. Test everything out. - To make sure everything is working you'll now SSH to GitHub: + To make sure everything is working you’ll now SSH to GitHub. Don’t change the “git@github.com” part. That’s supposed to be there.
-	$ ssh git@github.comAttempts to ssh to github
+	$ ssh git@github.comAttempts to ssh to github
 	
Which should give you this:
-	The authenticity of host 'github.com (207.97.227.239)' can't be established.
-	RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
-	Are you sure you want to continue connecting (yes/no)?
+	The authenticity of host 'github.com (207.97.227.239)' can't be established.
+	RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
+	Are you sure you want to continue connecting (yes/no)?
 	
Don’t worry, this is supposed to happen. Type “yes”.
-	Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts.
-	ERROR: Hi octocat! You've successfully authenticated, but GitHub does not provide 
shell access
- Connection to github.com closed. + Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts. + ERROR: Hi username! You've successfully authenticated, but GitHub does not provide
shell access
+ Connection to github.com closed.
+ + You don’t worry, about the “ERROR”. You actually want to see that. ##Then: Set Up Your Info @@ -151,23 +180,23 @@ Now that you have Git set up and your SSH keys entered in GitHub, it’s tim 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.
-	$ git config --global user.name "The Octocat"Sets the name of the user for all git instances on the system
-	$ git config --global user.email "octocat@github.com"Sets the email of the user for all git instances on the system
+	$ git config --global user.name "Firstname Lastname"Sets the name of the user for all git instances on the system
+	$ git config --global user.email "user_name@username.com"Sets the email of the user for all git instances on the system
 	
2. Set your GitHub token. Some tools connect to GitHub without SSH. To use these tools properly you need to find and configure your API Token. - On the GitHub site _Click “Account Settings”_ > _Click “Account Admin”_ + On the GitHub site _Click “Account Settings”_ > _Click “Account Admin.”_ Copy your API token In Terminal, run the following code, using your GitHub username and token in place of the ones shown.
-	$ git config --global github.user octocatSets the GitHub username for all git instances on the system
-	$ git config --global github.token 0123456789abcdef0123456789abcdefSets the GitHub token for all git instances on the system
+	$ git config --global github.user usernameSets the GitHub username for all git instances on the system
+	$ git config --global github.token 0123456789your0123456789tokenSets the GitHub token for all git instances on the system
 	
__*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-mac-set-up-git.markdown b/_posts/2011-02-15-mac-set-up-git.markdown index a4d3ef6..a35e587 100644 --- a/_posts/2011-02-15-mac-set-up-git.markdown +++ b/_posts/2011-02-15-mac-set-up-git.markdown @@ -18,119 +18,147 @@ _*If you don’t already know what Git is,
-

-Need a quick lesson on Terminal? -  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.app. A line that begins with the dollar sign ($) indicates a line of code you need to type. To enter it, type the text that follows the $, hitting the return key at the end of each line. If you see a line in an example that doesn’t begin with a $ (we’ve made them green in the bootcamp tutorials), that means it is a line of text that terminal has output for you to read and/or act upon. In the bootcamp examples, you can roll over the lines of Bash script for an explanation of what they do.

- - Good to know: 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 Terminal don’t have any output. Don’t worry, if there is ever a problem with your code, Terminal will let you know.

- - Good to know: For security reasons, Terminal will not display what you type when entering passwords. Just type your password and hit the return key. -
-
-

+
+

Need a quick lesson about Terminal?

+
+

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.

+ +

Input

+
+			$ echo 'This is input text'This tooltip tells you what's going on.
+		
+ +

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 to see what the script is doing

+ +

Output

+
+			$ This is output text.
+		
+ +

A line that does not begin with a $ is output text that is intended to give you information or tell you what to do next. We've colored output text green in these bootcamp tutorials.

+ +

User Specific Input

+
+			$ echo 'username'Outputs the text in the quote marks.
+		
+ +

Areas of yellow text represent your own personal info. 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

+ +

Good to know: 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 Terminal don’t have any output. Don’t worry, if there is ever a problem with your code, Terminal will let you know.

+ +

Good to know: For security reasons, Terminal will not display what you type when entering passwords. Just type your password and hit the return key.

+
+
1. Check for SSH keys. Have an existing kepair? You can skip to Step 4. First, we need to check for existing ssh keys on your computer:
-	$ cd ~/.sshChecks to see if there is a folder named ".ssh" in you user directory
+	$ cd ~/.sshChecks to see if there is a folder named ".ssh" in you user directory
 	
-

Does it say "No such file or directory"?

-

No: Go to Step 2
Yes: Skip to Step 3 -

+ If it says “No such file or directory“ skip to __step 3__. Otherwise continue to __step 2__. + 2. Backup and remove existing SSH keys. Since there is already an SSH directory you’ll want to back it up and remove it:
-	$ lsLists all the subdirectories in the current directory
-	config  id_rsa  id_rsa.pub  known_hosts
-	$ mkdir key_backupMakes a folder called "key_backup" in the current directory
-	$ cp id_rsa* key_backupCopies the contents of the id_rsa folder into key_backup folder
-	$ rm id_rsa*Deletes the contents of the id_rsa folder
+	$ lsLists all the subdirectories in the current directory
+	config  id_rsa  id_rsa.pub  known_hosts
+	$ mkdir key_backupMakes a folder called "key_backup" in the current directory
+	$ cp id_rsa* key_backupCopies the contents of the id_rsa folder into key_backup folder
+	$ rm id_rsa*Deletes the contents of the id_rsa folder
 	
3. Generate a new SSH key. - To generate a new SSH key, enter the code below. When asked to enter a file in which to save the key, just press enter without typing anything. + To generate a new SSH key, enter the code below. We want the default settings so when asked to enter a file in which to save the key, just press enter.
-	$ ssh-keygen -t rsa -C "octocat@github.com"Creates a new ssh key using the provided email
-	Generating public/private rsa key pair.
-	Enter file in which to save the key (/Users/octocat/.ssh/id_rsa):
-	Enter passphrase (empty for no passphrase):
-	Enter same passphrase again:
+	$ ssh-keygen -t rsa -C "your_email@youremail.com"Creates a new ssh key using the provided email
+	Generating public/private rsa key pair.
+	Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):
+	
+ + Now you need to enter a passphrase. _[Why is this important?](../working-with-key-passphrases)_ + +
+	Enter passphrase (empty for no passphrase):
+	Enter same passphrase again:
 	
Which should give you something like this:
-	Your identification has been saved in /Users/octocat/.ssh/id_rsa.
-	Your public key has been saved in /Users/octocat/.ssh/id_rsa.pub.
-	The key fingerprint is:
-	01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db octocat@github.com
-	The key's randomart image is:
-	+--[ RSA 2048]----+
-	|     .+   +      |
-	|       = o O .   |
-	|        = * *    |
-	|       o = +     |
-	|      o S .      |
-	|     o o =       |
-	|      o . E      |
-	|                 |
-	|                 |
-	+-----------------+
+	Your identification has been saved in /Users/your_user_directory/.ssh/id_rsa.
+	Your public key has been saved in /Users/your_user_directory/.ssh/id_rsa.pub.
+	The key fingerprint is:
+	01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db user_name@username.com
+	The key's randomart image is:
+	+--[ RSA 2048]----+
+	|     .+   +      |
+	|       = o O .   |
+	|        = * *    |
+	|       o = +     |
+	|      o S .      |
+	|     o o =       |
+	|      o . E      |
+	|                 |
+	|                 |
+	+-----------------+
 	
4. Add your SSH key to GitHub. On the GitHub site _Click “Account Settings”_ > _Click “SSH Public Keys”_ > _Click “Add another public key”_ - It’s important you copy your SSH key exactly as it is written without adding any newlines or whitespace. To ensure this, run the following code to copy the key to your clipboard. + __It’s important you copy your SSH key exactly as it is written without adding any newlines or whitespace.__ To ensure this, run the following code to copy the key to your clipboard.
-	$ cat ~/.ssh/id_rsa.pub | pbcopyCopies the contents of the id_rsa.pub file to your clipboard
+	$ cat ~/.ssh/id_rsa.pub | pbcopyCopies the contents of the id_rsa.pub file to your clipboard
 	
- Now paste it into the “Key” field + Now paste it into the “Key” field. - Paste your SSH Key + Paste your SSH Key - Hit “Add Key” + Hit “Add Key.” 5. Test everything out. - To make sure everything is working you'll now SSH to GitHub: + To make sure everything is working you’ll now SSH to GitHub. Don’t change the “git@github.com” part. That’s supposed to be there.
-	$ ssh git@github.comAttempts to ssh to github
+	$ ssh git@github.comAttempts to ssh to github
 	
Which should give you this:
-	The authenticity of host 'github.com (207.97.227.239)' can't be established.
-	RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
-	Are you sure you want to continue connecting (yes/no)?
+	The authenticity of host 'github.com (207.97.227.239)' can't be established.
+	RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
+	Are you sure you want to continue connecting (yes/no)?
 	
Don’t worry, this is supposed to happen. Type “yes”.
-	Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts.
-	ERROR: Hi octocat! You've successfully authenticated, but GitHub does not provide 
shell access
- Connection to github.com closed. + Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts. + ERROR: Hi username! You've successfully authenticated, but GitHub does not provide
shell access
+ Connection to github.com closed.
+ You don’t worry, about the “ERROR”. You actually want to see that. + + ##Then: 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. @@ -140,23 +168,23 @@ Now that you have Git set up and your SSH keys entered in GitHub, it’s tim 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.
-	$ git config --global user.name "The Octocat"Sets the name of the user for all git instances on the system
-	$ git config --global user.email "octocat@github.com"Sets the email of the user for all git instances on the system
+	$ git config --global user.name "Firstname Lastname"Sets the name of the user for all git instances on the system
+	$ git config --global user.email "your_email@youremail.com"Sets the email of the user for all git instances on the system
 	
2. Set your GitHub token. Some tools connect to GitHub without SSH. To use these tools properly you need to find and configure your API Token. - On the GitHub site _Click “Account Settings”_ > _Click “Account Admin”_ + On the GitHub site _Click “Account Settings”_ > _Click “Account Admin.”_ Copy your API token In Terminal, run the following code, using your GitHub username and token in place of the ones shown.
-	$ git config --global github.user octocatSets the GitHub username for all git instances on the system
-	$ git config --global github.token 0123456789abcdef0123456789abcdefSets the GitHub token for all git instances on the system
+	$ git config --global github.user usernameSets the GitHub username for all git instances on the system
+	$ git config --global github.token 0123456789yourf0123456789tokenSets the GitHub token for all git instances on the system
 	
__*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-set-up-git-redirect.markdown b/_posts/2011-02-15-set-up-git-redirect.markdown index 860abc0..8209e30 100644 --- a/_posts/2011-02-15-set-up-git-redirect.markdown +++ b/_posts/2011-02-15-set-up-git-redirect.markdown @@ -13,7 +13,7 @@ Attempting to redirect to the guide for your OS. If the redirect fails, pick yo * [Linux](linux-set-up-git) \ No newline at end of file diff --git a/_posts/2011-02-15-win-set-up-git.markdown b/_posts/2011-02-15-win-set-up-git.markdown index bdbf163..e1a8878 100644 --- a/_posts/2011-02-15-win-set-up-git.markdown +++ b/_posts/2011-02-15-win-set-up-git.markdown @@ -14,103 +14,146 @@ _*If you don’t already know what Git is,
Download and install the latest version of msysgit. - Use the default options for each step. Do not use PuTTY if you are given the option. GitHub only provides support for openssh. + Use the default options for each step. + + Welcome page + Information + Select destination location + Select start menu folder + Select components + Adjusting your PATH environment + Configuring the line ending conversions + Installing + Installation complete + + + __Do not use PuTTY if you are given the option. GitHub only provides support for openssh.__ ##Next: Set Up SSH Keys -We use SSH keys to establish a secure connection between your computer and GitHub. Setting them up is fairly easy, but does involves a number of steps. +We use SSH keys to establish a secure connection between your computer and GitHub. Setting them up is fairly easy, but does involve a number of steps. To make sure you generate a brand new key, you need to check if one already exists. First, you need to open Git Bash (not the Windows command line), found in the start menu in the git. Open the terminal -

-Need a quick lesson on Git Bash? -  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 msysgit called Git Bash (There is probably an shortcut on your desktop). A line that begins with the dollar sign ($) indicates a line of code you need to type. To enter it, type the text that follows the $, hitting the return key at the end of each line. If you see a line in an example that doesn’t begin with a $ (we’ve made them green in the bootcamp tutorials), that means it is a line of text that Git Bash has output for you to read and/or act upon. In the bootcamp examples, you can roll over the lines of Bash script for an explanation of what they do.

- - Good to know: 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.

- - Good to know: For security reasons, Git Bash will not display what you type when entering passwords. Just type your password and hit the return key. -
+Need a quick lesson about Terminal? + +   + +

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.

+ +

Input

+
+				$ echo 'This is input text'This tooltip tells you what's going on.
+			
+ +

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 to see what the script is doing

+ +

Output

+
+				$ This is output text.
+			
+ +

A line that does not begin with a $ is output text that is intended to give you information or tell you what to do next. We've colored output text green in these bootcamp tutorials.

+ +

User Specific Input

+
+				$ echo 'username'Outputs the text in the quote marks.
+			
+ +

Areas of yellow text represent your own personal info. 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

+ +

Good to know: 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 Terminal don’t have any output. Don’t worry, if there is ever a problem with your code, Terminal will let you know.

+ +

Good to know: For security reasons, Terminal will not display what you type when entering passwords. Just type your password and hit the return key.

+ + -

+ 1. Check for SSH keys. Have an existing kepair? You can skip to Step 4. First, we need to check for existing ssh keys on your computer:
-	$ cd ~/.sshChecks to see if there is a folder named ".ssh" in you user directory
+	$ cd ~/.sshChecks to see if there is a folder named ".ssh" in you user directory
 	
-

Does it say "No such file or directory"?

-

No: Go to Step 2
Yes: Skip to Step 3 -

+ If it says “No such file or directory“ skip to __step 3__. Otherwise continue to __step 2__. + 2. Backup and remove existing SSH keys. Since there is already an SSH directory you’ll want to back it up and remove it:
-	$ lsLists all the subdirectories in the current directory
-	config  id_rsa  id_rsa.pub  known_hosts
-	$ mkdir key_backupMakes a folder called "key_backup" in the current directory
-	$ cp id_rsa* key_backupCopies the contents of the id_rsa folder into key_backup folder
-	$ rm id_rsa*Deletes the contents of the id_rsa folder
+	$ lsLists all the subdirectories in the current directory
+	config  id_rsa  id_rsa.pub  known_hosts
+	$ mkdir key_backupMakes a folder called "key_backup" in the current directory
+	$ cp id_rsa* key_backupCopies the contents of the id_rsa folder into key_backup folder
+	$ rm id_rsa*Deletes the contents of the id_rsa folder
 	
3. Generate a new SSH key. - To generate a new SSH key, enter the code below. When asked to enter a file in which to save the key, just press enter without typing anything. + To generate a new SSH key, enter the code below. We want the default settings so when asked to enter a file in which to save the key, just press enter. + +
+	$ ssh-keygen -t rsa -C "user_name@username.com"Creates a new ssh key using the provided email
+	Generating public/private rsa key pair.
+	Enter file in which to save the key (/c/Users/your_user_directory/.ssh/id_rsa):
+	
+ + Now you need to enter a passphrase. _[Why is this important?](../working-with-key-passphrases)_
-	$ ssh-keygen -t rsa -C "octocat@github.com"Creates a new ssh key using the provided email
-	Generating public/private rsa key pair.
-	Enter file in which to save the key (/c/Users/octocat/.ssh/id_rsa):
-	Enter passphrase (empty for no passphrase):
-	Enter same passphrase again:
+	Enter passphrase (empty for no passphrase):
+	Enter same passphrase again:
 	
Which should give you something like this:
-	Your identification has been saved in /c/Users/octocat/.ssh/id_rsa.
-	Your public key has been saved in /c/Users/octocat/.ssh/id_rsa.pub.
-	The key fingerprint is:
-	01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db octocat@github.com
+	Your identification has been saved in /c/Users/your_user_directory/.ssh/id_rsa.
+	Your public key has been saved in /c/Users/your_user_directory/.ssh/id_rsa.pub.
+	The key fingerprint is:
+	01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db user_name@username.com
 	
4. Add your SSH key to GitHub. 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 + 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. - Paste your SSH Key + Paste your SSH Key - Hit “Add Key” + Hit “Add Key.” 5. Test everything out. - To make sure everything is working you'll now SSH to GitHub: + To make sure everything is working you’ll now SSH to GitHub. Don’t change the “git@github.com” part. That’s supposed to be there.
-	$ ssh git@github.comAttempts to ssh to github
+	$ ssh git@github.comAttempts to ssh to github
 	
Which should give you this:
-	The authenticity of host 'github.com (207.97.227.239)' can't be established.
-	RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
-	Are you sure you want to continue connecting (yes/no)?
+	The authenticity of host 'github.com (207.97.227.239)' can't be established.
+	RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
+	Are you sure you want to continue connecting (yes/no)?
 	
Don’t worry, this is supposed to happen. Type “yes”.
-	Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts.
-	ERROR: Hi octocat! You've successfully authenticated, but GitHub does not provide 
shell access
- Connection to github.com closed. + Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts. + ERROR: Hi username! You've successfully authenticated, but GitHub does not provide
shell access
+ Connection to github.com closed.
+ + You don’t worry, about the “ERROR”. You actually want to see that. ##Then: Set Up Your Info @@ -121,23 +164,23 @@ Now that you have Git set up and your SSH keys entered in GitHub, it’s tim 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.
-	$ git config --global user.name "The Octocat"Sets the name of the user for all git instances on the system
-	$ git config --global user.email "octocat@github.com"Sets the email of the user for all git instances on the system
+	$ git config --global user.name "Firstname Lastname"Sets the name of the user for all git instances on the system
+	$ git config --global user.email "user_name@username.com"Sets the email of the user for all git instances on the system
 	
2. Set your GitHub token. Some tools connect to GitHub without SSH. To use these tools properly you need to find and configure your API Token. - On the GitHub site _Click “Account Settings”_ > _Click “Account Admin”_ + On the GitHub site _Click “Account Settings”_ > _Click “Account Admin.”_ Copy your API token In Git Bash, run the following code, using your GitHub username and token in place of the ones shown.
-	$ git config --global github.user octocatSets the GitHub username for all git instances on the system
-	$ git config --global github.token 0123456789abcdef0123456789abcdefSets the GitHub token for all git instances on the system
+	$ git config --global github.user usernameSets the GitHub username for all git instances on the system
+	$ git config --global github.token 0123456789your0123456789tokenSets the GitHub token for all git instances on the system
 	
__*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-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. Create a new repo - Click “New Repository + Click “New Repository. Click “New Repository - Fill out the information on this page. When you’re done, click “Create Repository” + Fill out the information on this page. When you’re done, click “Create Repository.” Fill in the info @@ -33,11 +33,11 @@ While a README isn’t a required part of a GitHub repo, it is a good idea t In the prompt, type the following code:
-	$ mkdir ~/Hello-WorldCreates a folder for your project called "Hello-World" in your user folder
-	$ cd ~/Hello-WorldChanges the active directory in the prompt to your newly created folder
-	$ git initSets up the necessary Git files
-	Initialized empty Git repository in /Users/octocat/Hello-World/.git/
-	$ touch READMECreates a file called "README" in your Hello-World folder
+	$ mkdir ~/Hello-WorldCreates a folder for your project called "Hello-World" in your user folder
+	$ cd ~/Hello-WorldChanges the active directory in the prompt to your newly created folder
+	$ git initSets up the necessary Git files
+	Initialized empty Git repository in /Users/your_user_directory/Hello-World/.git/
+	$ touch READMECreates a file called "README" in your Hello-World folder
 	
Open the new README file found in your Hello-World folder in a text editor and add the text “Hello World!.” When you are finished, save and close the file. @@ -47,15 +47,15 @@ While a README isn’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:
-	$ git add READMEStages your README file, adding it to the list of files to be committed
-	$ git commit -m 'first commit'Commits your files, adding the message "first commit"
+	$ git add READMEStages your README file, adding it to the list of files to be committed
+	$ git commit -m 'first commit'Commits your files, adding the message "first commit"
 	
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:
-	$ git remote add origin git@github.com:octocat/Hello-World.gitSets the origin for the Hello-World repo
-	$ git push origin masterSends your commit to GitHub
+	$ git remote add origin git@github.com:username/Hello-World.gitSets the origin for the Hello-World repo
+	$ git push origin masterSends your commit to GitHub
 	
Now if you look at your repository on GitHub, you will see your README has been added to it. diff --git a/_posts/2011-02-17-fork-a-repo.markdown b/_posts/2011-02-17-fork-a-repo.markdown index 4e8878c..29fd3e4 100644 --- a/_posts/2011-02-17-fork-a-repo.markdown +++ b/_posts/2011-02-17-fork-a-repo.markdown @@ -6,41 +6,39 @@ categories: bootcamp main_category: bootcamp --- -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." +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.” ##First: Fork A Repo -For this tutorial, we'll be using the Fork It project. +For this tutorial, we’ll be using the Spoon-Knife project. -1. Fork the “Fork It ” repo +1. Fork the “Spoon-Knife ” repo - To fork this project, click the "Fork" button. + To fork this project, click the “Fork” button. Click “Fork ##Next: Set Up Your Local Repo -You’ve successfully forked the Fork It repo, but so far it only exists on GitHub. To be able to work on the project, you will need to clone it to your local machine. +You’ve successfully forked the Spoon-Knife repo, but so far it only exists on GitHub. To be able to work on the project, you will need to clone it to your local machine. -1. Clone the “Fork It ” project +1. Clone the “Spoon-Knife” project Run the following code:
-	$ git clone git@github.com:octocat/Fork-it.gitClones the linked repo into the current folder
+	$ git clone git@github.com:username/Spoon-Knife.gitClones your copy of the repo into the current folder in terminal
 	
2. Configure remotes - Each repository has a default remote* called `origin`. The origin remote in your new cloned 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`: + 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`:
-	$ cd Fork-itChanges the active directory in the prompt to the newly cloned "Fork-it" directory
-	$ git remote add upstream git://github.com/octocat/Fork-it.gitCreates a remote called "upstream" and assigns it the original repo URL
-	$ git fetch upstreamPulls in any changes not present in your local repository, but doesn't modify your working files
+	$ cd Spoon-KnifeChanges the active directory in the prompt to the newly cloned "Spoon-Knife" directory
+	$ git remote add upstream git://github.com/octocat/Spoon-Knife.gitAssigns the original repo to a remote called "upstream"
+	$ git fetch upstreamPulls in any changes not present in your local repository, but doesn't modify your working files
 	
- - *A “remote” is a reference to the GitHub URL where your commits are stored. ##Then: More Things You Can Do @@ -51,7 +49,7 @@ Congratulations, you’ve successfully forked a repo, but get a load of thes 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:
-	$ git push origin masterPushes commits to GitHub
+	$ git push origin masterPushes commits to your remote repo stored on GitHub
 	
- Pull in upstream changes @@ -59,10 +57,60 @@ Congratulations, you’ve successfully forked a repo, but get a load of thes If the original repo you forked your project from gets updated, you can add those updates to your fork by running the following code:
-	$ git fetch upstreamFetches any new changes from the original repo
-	$ git merge upstream/masterMerges any changes fetched into your working files
+	$ git fetch upstreamFetches any new changes from the original repo
+	$ git merge upstream/masterMerges any changes fetched into your working files
 	
+ +
+

What is the difference between fetch and pull?

+
+

+ There are two ways to get changes from a remote repo or branch: fetch and pull. While they might seem similar at first, there are distinct differences you should consider. +

+

Pull

+
+					$ git pull upstreamPulls changes from upstream and adds them to the local repo
+				
+

When you use pull, Git tries to automatically do your work for you. It is context sensitive, so Git will apply any pulled changes to the branch you are currently working in. One thing to keep in mind is that pull automatically applies the changes without letting you review them first. If you don't closely manage your branches you may run into frequent conflicts.

+ +

Fetch/Merge

+
+					$ git fetch upstreamFetches any new changes from the original repo
+					$ git merge upstream/masterMerges any changes fetched into your working files
+				
+

When you fetch, Git downloads any changes from the specified branch, but does not apply them to your files. This is very useful if you need to keep your repo up to date but are working on something that might break if your files are updated. To apply the changes, you use merge. This combines the specified branches and prompts you if there are any conflicts.

+
+
+ +- Work with branches + Branching allows you to build new features or test out ideas without putting your main project at risk. A Git branch is a small file that references the commit it was spawned from. This makes Git branches very small and easy to work with. + +
+

How do I use branches?

+
+ +

+ Branches are pretty easy to work with and will save you a lot of headaches, especially when working with multiple people. To create a branch and begin working in it, use the following script: +

+ +
+				$ git branch newbranchCreates a new branch called "newbranch"
+				$ git checkout newbranchMakes "newbranch" the active branch
+			
+ +

Alternatively, you can use the shortcut:

+ +
+				$ git checkout -b newbranchCreates a new branch called "newbranch"
+			
+ +

To switch between branches, use checkout.

+ +
+
+ + - Pull requests If you are hoping to contribute back to the original fork, you can send the original author a [pull request](/pull-requests/). diff --git a/_posts/2011-02-18-be-social.markdown b/_posts/2011-02-18-be-social.markdown index fc06e97..67935fa 100644 --- a/_posts/2011-02-18-be-social.markdown +++ b/_posts/2011-02-18-be-social.markdown @@ -44,7 +44,7 @@ main_category: bootcamp Click “Follow - Congratulations! You are now following a friend. You will be notified about their activity on GitHub. + Congratulations! You are now following a friend. Their activity on GitHub will now show up on your dashboard. ##Next: Watch A Project @@ -58,7 +58,7 @@ At some point you may want to stay up-to-date with a specific project. We’ Click “Watch - Congratulations! You are now watching the the Hello World project. If the Octocat updates it, you will be notified. + Congratulations! You are now watching the the Hello World project. If the Octocat updates it, you will see what happened in your dashboard. ##Lastly: Celebrate -- cgit v1.3.1