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-16-create-a-repo.markdown | 74 ++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 _posts/2011-02-16-create-a-repo.markdown (limited to '_posts/2011-02-16-create-a-repo.markdown') 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 -- cgit v1.3.1