100100 adds < code > [url]</ code > under a local remote named < code > [alias]</ code > .</ p >
101101
102102 < p > For example, if we want to share our Hello World program with the world,
103- we can create a new repository on a server (I'll use GitHub as an example),
103+ we can create a new repository on a server (Using GitHub as an example),
104104 which should give you a URL, in this case "git@github.com:schacon/hw.git".
105105 To add that to our project so we can push to it and fetch updates from it
106106 we would do this:</ p >
117117 has no special meaning but is widely used because < code > git init</ code >
118118 sets it up by default, 'origin' is often used as a remote name because
119119 < code > git clone</ code > sets it up by default as the cloned-from URL. In
120- this case I've decided to name my remote 'github', but I could have really
121- named it just about anything.
120+ this case we'll name the remote 'github', but you could name it just
121+ about anything.
122122 </ p >
123123
124124 < h4 >
@@ -266,20 +266,20 @@ <h2>
266266 < p > The second command that will fetch down new data from a remote server is
267267 < code > git pull</ code > . This command will basically run a < code > git fetch</ code >
268268 immediately followed by a < code > git merge</ code > of the branch on that remote
269- that is tracked by whatever branch you are currently in. I personally don't much
270- like this command - I prefer running < code > fetch</ code > and < code > merge</ code >
271- separately. Less magic, less problems. However, if you like this idea, you
272- can read about it in more detail in the
269+ that is tracked by whatever branch you are currently in. Running the
270+ < code > fetch</ code > and < code > merge</ code > commands separately involves less magic
271+ and less problems, but if you like the idea of < code > pull </ code > , you can
272+ read about it in more detail in the
273273 < a target ="new " href ="http://git-scm.com/docs/git-pull "> official docs</ a > .
274274 </ p >
275275
276276 < p > Assuming you have a remote all set up and you want to pull in updates, you
277277 would first run < code > git fetch [alias]</ code > to tell Git to fetch down all the
278278 data it has that you do not, then you would run < code > git merge [alias]/[branch]</ code >
279279 to merge into your current branch anything new you see on the server
280- (like if someone else has pushed in the meantime). So, if I were working on my
281- Hello World project with several other people and I wanted to bring in any changes
282- that had been pushed since I last connected, I would do something like this:</ p >
280+ (like if someone else has pushed in the meantime). So, if you were working on a
281+ Hello World project with several other people and wanted to bring in any changes
282+ that had been pushed since we last connected, we would do something like this:</ p >
283283
284284< pre >
285285< b > $ git fetch github</ b >
@@ -296,17 +296,17 @@ <h2>
296296 * [new branch] lisp -> github/lisp
297297</ pre >
298298
299- < p > I can see that since the last time I synchronized with this remote, five branches
299+ < p > Here we can see that since we last synchronized with this remote, five branches
300300 have been added or updated. The 'ada' and 'lisp' branches are new, where the
301- 'master', 'c-langs' and 'java' branches have been updated. In this case, my team
302- is pushing proposed updates to remote branches for review before they're merged
303- into 'master'.
301+ 'master', 'c-langs' and 'java' branches have been updated. In our example case,
302+ other developers are pushing proposed updates to remote branches for review before
303+ they're merged into 'master'.
304304 </ p >
305305
306306 < p > You can see the mapping that Git makes. The 'master' branch on the remote
307- repository becomes a branch named 'github/master' locally. That way now I can
308- merge the 'master' branch on that remote into my local 'master' branch by running
309- < code > git merge github/master</ code > . Or, I can see what new commits are on that
307+ repository becomes a branch named 'github/master' locally. That way you can
308+ merge the 'master' branch on that remote into the local 'master' branch by running
309+ < code > git merge github/master</ code > . Or, you can see what new commits are on that
310310 branch by running < code > git log github/master ^master</ code > . If your remote
311311 is named 'origin' it would be < code > origin/master</ code > instead. Almost any
312312 command you would run using local branches you can use remote branches with too.
@@ -356,10 +356,10 @@ <h2>
356356</ pre >
357357
358358 < p > Pretty easy. Now if someone clones that repository they will get exactly
359- what I have committed and all of its history.</ p >
359+ what we have committed and all of its history.</ p >
360360
361- < p > What if I have a topic branch like the 'erlang' branch we created earlier
362- and I just want to share that? You can just push that branch instead.</ p >
361+ < p > What if you have a topic branch like the 'erlang' branch created earlier
362+ and want to share just that? You can just push that branch instead.</ p >
363363
364364< pre >
365365< b > $ git push github erlang</ b >
0 commit comments