From 9daf8363660584647d2c38f5b1ce7c664db1d5cb Mon Sep 17 00:00:00 2001 From: Cameron McEfee Date: Mon, 28 Feb 2011 14:26:03 -0800 Subject: added more definitions/explanations --- _posts/2011-02-17-fork-a-repo.markdown | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to '_posts/2011-02-17-fork-a-repo.markdown') 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 --- -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. This guide will walk you through the basics and explain a little bit about how everything works along the way. ##First: Fork A Repo -For this tutorial, we’ll be using the Spoon-Knife 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 Spoon-Knife project. 1. Fork the “Spoon-Knife ” repo @@ -32,7 +32,19 @@ You’ve successfully forked the Spoon-Knife repo, but so far it only exists 2. Configure remotes - 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`: + +
+

More about remotes

+
+

+ A remote 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 origin to the remote that points to your main offsite repo (for example, your GitHub repo). +

+

+ Git supports multiple remotes. This is commonly used when forking a repo. +

+
+
 	$ cd Spoon-KnifeChanges the active directory in the prompt to the newly cloned "Spoon-Knife" directory
@@ -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:
 	
+	
+

More about commits

+
+

+ Think of a commit 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. +

+
+
+
 	$ git push origin masterPushes commits to your remote repo stored on GitHub
 	
-- cgit v1.3.1