From 4958b3e6d038acfbad8b974ed927f10f62f8b17c Mon Sep 17 00:00:00 2001 From: Cameron McEfee Date: Tue, 22 Feb 2011 18:39:40 -0800 Subject: Added bootcamp files --- _posts/2011-02-15-linux-set-up-git.markdown | 184 +++++++++++++++++++++++++ _posts/2011-02-15-mac-set-up-git.markdown | 173 +++++++++++++++++++++++ _posts/2011-02-15-set-up-git-redirect.markdown | 19 +++ _posts/2011-02-15-win-set-up-git.markdown | 157 +++++++++++++++++++++ _posts/2011-02-16-create-a-repo.markdown | 74 ++++++++++ _posts/2011-02-17-fork-a-repo.markdown | 79 +++++++++++ _posts/2011-02-18-be-social.markdown | 72 ++++++++++ 7 files changed, 758 insertions(+) create mode 100644 _posts/2011-02-15-linux-set-up-git.markdown create mode 100644 _posts/2011-02-15-mac-set-up-git.markdown create mode 100644 _posts/2011-02-15-set-up-git-redirect.markdown create mode 100644 _posts/2011-02-15-win-set-up-git.markdown create mode 100644 _posts/2011-02-16-create-a-repo.markdown create mode 100644 _posts/2011-02-17-fork-a-repo.markdown create mode 100644 _posts/2011-02-18-be-social.markdown (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 new file mode 100644 index 0000000..5f53caf --- /dev/null +++ b/_posts/2011-02-15-linux-set-up-git.markdown @@ -0,0 +1,184 @@ +--- +layout: default +title: Set Up Git (Linux) +description: A quick guide to help you get started with Git +--- + +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 technical walkthrough instead. + +##First: Download and Install Git + +At the heart of GitHub is an open source version control system (VCS) called Git*. Created by the same dudes that created Linux, Git is responsible for everything GitHub related that happens locally on your computer. + +_*If you don’t already know what Git is, take a crash course._ + +1. Download and install the latest version of Git with Synaptic. + + We suggest you install git-core, git-gui, and git-doc. + + Open Synaptic + Mark git-core, git-gui, and git-doc for installation + git-core, git-gui, and git-doc are selected + + When you’ve selected git-core, git-gui, and git-doc, hit “Apply” to install them. + + Click Apply + + __*Note*__ Don’t worry that you don’t see an icon when it’s done. It’s not that kind of application. + +##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. + +To make sure you generate a brand new key, you need to check if one already exists. First, you need to open an app called Terminal. + +Open the terminal + +

+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. +
+
+

+ +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
+	
+ +

Does it say "No such file or directory"?

+

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

+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
+	
+ +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. + +
+	$ 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:
+	
+ + 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      |
+	|                 |
+	|                 |
+	+-----------------+
+	
+ +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. + +
+	$ 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 + + Paste your SSH Key + + Hit “Add Key” + +5. Test everything out. + + To make sure everything is working you'll now 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)?
+	
+ + 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. +
+ +##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. + +1. Set your username and email. + + 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
+	
+ +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”_ + + 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
+	
+ + __*Note*__ If you ever change your GitHub password, a new token will be created and will need to be updated. + +##Lastly: Celebrate + +Congratulations, you now have Git and GitHub all set up! What do you want to do next? + +
    +
  1. Set Up Git
  2. +
  3. Create A Repository
  4. +
  5. Fork A Repository
  6. +
  7. Be Social
  8. +
\ No newline at end of file diff --git a/_posts/2011-02-15-mac-set-up-git.markdown b/_posts/2011-02-15-mac-set-up-git.markdown new file mode 100644 index 0000000..a4d3ef6 --- /dev/null +++ b/_posts/2011-02-15-mac-set-up-git.markdown @@ -0,0 +1,173 @@ +--- +layout: default +title: Set Up Git (OSX) +description: A quick guide to help you get started with Git +--- + +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 technical walkthrough instead. + +##First: Download and Install Git + +At the heart of GitHub is an open source version control system (VCS) called Git*. Created by the same dudes that created Linux, Git is responsible for everything GitHub related that happens locally on your computer. + +_*If you don’t already know what Git is, take a crash course._ + +1. Download and install the latest version of Git. + + __*Note*__ Don’t worry that you don’t see an icon when it’s done. It’s not that kind of application. + +##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. + +To make sure you generate a brand new key, you need to check if one already exists. First, you need to open Terminal.app, usually found at /Applications/Utilities. + +Open the terminal + +

+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. +
+
+

+ +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
+	
+ +

Does it say "No such file or directory"?

+

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

+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
+	
+ +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. + +
+	$ 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:
+	
+ + 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      |
+	|                 |
+	|                 |
+	+-----------------+
+	
+ +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. + +
+	$ cat ~/.ssh/id_rsa.pub | pbcopyCopies the contents of the id_rsa.pub file to your clipboard
+	
+ + Now paste it into the “Key” field + + Paste your SSH Key + + Hit “Add Key” + +5. Test everything out. + + To make sure everything is working you'll now 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)?
+	
+ + 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. +
+ +##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. + +1. Set your username and email. + + 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
+	
+ +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”_ + + 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
+	
+ + __*Note*__ If you ever change your GitHub password, a new token will be created and will need to be updated. + +##Lastly: Celebrate + +Congratulations, you now have Git and GitHub all set up! What do you want to do next? + +
    +
  1. Set Up Git
  2. +
  3. Create A Repository
  4. +
  5. Fork A Repository
  6. +
  7. Be Social
  8. +
\ No newline at end of file diff --git a/_posts/2011-02-15-set-up-git-redirect.markdown b/_posts/2011-02-15-set-up-git-redirect.markdown new file mode 100644 index 0000000..860abc0 --- /dev/null +++ b/_posts/2011-02-15-set-up-git-redirect.markdown @@ -0,0 +1,19 @@ +--- +layout: default +title: Set Up Git +description: A quick guide to help you get started with Git +categories: bootcamp +main_category: bootcamp +--- + +Attempting to redirect to the guide for your OS. If the redirect fails, pick your OS: + +* [Windows](win-set-up-git) +* [Mac](mac-set-up-git) +* [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 new file mode 100644 index 0000000..bdbf163 --- /dev/null +++ b/_posts/2011-02-15-win-set-up-git.markdown @@ -0,0 +1,157 @@ +--- +layout: default +title: Set Up Git (Windows) +description: A quick guide to help you get started with Git +--- + +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 technical walkthrough instead. + +##First: Download and Install Git + +At the heart of GitHub is an open source version control system (VCS) called Git*. Created by the same dudes that created Linux, Git is responsible for everything GitHub related that happens locally on your computer. + +_*If you don’t already know what Git is, take a crash course._ + +1. 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. + +##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. + +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. +
+
+

+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
+	
+ +

Does it say "No such file or directory"?

+

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

+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
+	
+ +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. + +
+	$ 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:
+	
+ + 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
+	
+ +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 + + Paste your SSH Key + + Hit “Add Key” + +5. Test everything out. + + To make sure everything is working you'll now 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)?
+	
+ + 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. +
+ +##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. + +1. Set your username and email. + + 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
+	
+ +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”_ + + 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
+	
+ + __*Note*__ If you ever change your GitHub password, a new token will be created and will need to be updated. + +##Lastly: Celebrate + +Congratulations, you now have Git and GitHub all set up! What do you want to do next? + +
    +
  1. Set Up Git
  2. +
  3. Create A Repository
  4. +
  5. Fork A Repository
  6. +
  7. Be Social
  8. +
+ \ No newline at end of file diff --git a/_posts/2011-02-16-create-a-repo.markdown b/_posts/2011-02-16-create-a-repo.markdown new file mode 100644 index 0000000..3cd470a --- /dev/null +++ b/_posts/2011-02-16-create-a-repo.markdown @@ -0,0 +1,74 @@ +--- +layout: default +title: Create A Repo +description: Create the place where your commits will be stored +categories: bootcamp +main_category: bootcamp +--- + +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. + +##First: Create A Repo + +Every time you push your commits to GitHub, they get stored in a repository (a.k.a. “repo”) + +1. Create a new repo + + Click “New Repository + + Click “New Repository + + Fill out the information on this page. When you’re done, click “Create Repository” + + Fill in the info + + Congratulations! You have successfully created your first repo! + +##Next: Create a README for your repo. + +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. + +1. Create the README file + + 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
+	
+ + 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. + +2. Commit your README + + 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"
+	
+ + 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
+	
+ + Now if you look at your repository on GitHub, you will see your README has been added to it. + + Your README has been created + +##Lastly: Celebrate + +Congratulations! You have now created a repository on GitHub, created a README, committed it, and pushed it to GitHub. What do you want to do next? + +
    +
  1. Set Up Git
  2. +
  3. Create A Repository
  4. +
  5. Fork A Repository
  6. +
  7. Be Social
  8. +
\ No newline at end of file diff --git a/_posts/2011-02-17-fork-a-repo.markdown b/_posts/2011-02-17-fork-a-repo.markdown new file mode 100644 index 0000000..4e8878c --- /dev/null +++ b/_posts/2011-02-17-fork-a-repo.markdown @@ -0,0 +1,79 @@ +--- +layout: default +title: Fork A Repo +description: Copy a repo to create a new, unique project from its contents. +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." + +##First: Fork A Repo + +For this tutorial, we'll be using the Fork It project. + +1. Fork the “Fork It ” repo + + 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. + +1. Clone the “Fork It ” project + + Run the following code: + +
+	$ git clone git@github.com:octocat/Fork-it.gitClones the linked repo into the current folder
+	
+ +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`: + +
+	$ 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
+	
+ + *A “remote” is a reference to the GitHub URL where your commits are stored. + +##Then: More Things You Can Do + +Congratulations, you’ve successfully forked a repo, but get a load of these other cool things you can do: + +- Push commits + + 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
+	
+ +- Pull in upstream changes + + 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
+	
+ +- Pull requests + + If you are hoping to contribute back to the original fork, you can send the original author a [pull request](/pull-requests/). + +##Lastly: Celebrate + +You have now created forked a repo. What do you want to do next? + +
    +
  1. Set Up Git
  2. +
  3. Create A Repository
  4. +
  5. Fork A Repository
  6. +
  7. Be Social
  8. +
\ No newline at end of file diff --git a/_posts/2011-02-18-be-social.markdown b/_posts/2011-02-18-be-social.markdown new file mode 100644 index 0000000..fc06e97 --- /dev/null +++ b/_posts/2011-02-18-be-social.markdown @@ -0,0 +1,72 @@ +--- +layout: default +title: Be Social +description: Follow a friend. Watch a project. +categories: bootcamp +main_category: bootcamp +--- + +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! + +##First: Follow A Friend + +1. Pick a friend. + + Why not follow one of these cool people? +
+ + +

Tom Preston-Werner

+

mojombo

+
+ + +

Chris Wanstrath

+

defunkt

+
+ + +

PJ Hyett

+

pjhyett

+
+ + +

Scott Chacon

+

schacon

+
+
+ + Who are these fine fellows? Why the founders of GitHub, of course! + +2. Follow a friend + + Once you are on one of their pages, click the “follow” button. + + Click “Follow + + Congratulations! You are now following a friend. You will be notified about their activity on GitHub. + +##Next: Watch A Project + +At some point you may want to stay up-to-date with a specific project. We’ve made this easy to do. + +1. Watch a project + + Our friend the Octocat has a project called Hello World that we’d like to watch. + + Once you are in the project page, you will notice there is a “watch” button at the top of the page. Click on it. + + Click “Watch + + Congratulations! You are now watching the the Hello World project. If the Octocat updates it, you will be notified. + +##Lastly: Celebrate + +Congratulations! You are quite the socialite. What do you want to do next? + +
    +
  1. Set Up Git
  2. +
  3. Create A Repository
  4. +
  5. Fork A Repository
  6. +
  7. Be Social
  8. +
\ No newline at end of file -- cgit v1.3.1