From c9055e51fe06c70dd6376a960f18bbf5babb4a1b Mon Sep 17 00:00:00 2001 From: Cameron McEfee Date: Fri, 25 Feb 2011 16:17:08 -0800 Subject: Updated content and added a new 'more info' tool --- _posts/2011-02-17-fork-a-repo.markdown | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 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 29fd3e4..0ae782d 100644 --- a/_posts/2011-02-17-fork-a-repo.markdown +++ b/_posts/2011-02-17-fork-a-repo.markdown @@ -27,7 +27,7 @@ You’ve successfully forked the Spoon-Knife repo, but so far it only exists Run the following code:
-	$ git clone git@github.com:username/Spoon-Knife.gitClones your copy of the repo into the current folder in terminal
+	$ git clone git@github.com:username/Spoon-Knife.gitClones your copy of the repo into the current directory in terminal
 	
2. Configure remotes @@ -42,7 +42,7 @@ You’ve successfully forked the Spoon-Knife repo, but so far it only exists ##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: +You’ve successfully forked a repo, but get a load of these other cool things you can do: - Push commits @@ -89,24 +89,37 @@ Congratulations, you’ve successfully forked a repo, but get a load of thes

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
+				$ git branch mybranchCreates a new branch called "mybranch"
+				$ git checkout mybranchMakes "mybranch" the active branch
 			

Alternatively, you can use the shortcut:

-				$ git checkout -b newbranchCreates a new branch called "newbranch"
+				$ git checkout -b mybranchCreates a new branch called "mybranch" and makes it the active branch
 			

To switch between branches, use checkout.

+
+				$ git checkout masterMakes "master" the active branch
+				$ git checkout mybranchMakes "mybranch" the active branch
+			
+ +

Once you’re finished working on your branch and are ready to combine it back into the master branch, use merge.

+ +
+				$ git checkout masterMakes "master" the active branch
+				$ git merge mybranchMerges the commits from "mybranch" into "master"
+				$ git branch -d mybranchDeletes the "mybranch" branch
+			
+
-- cgit v1.3.1