Skip to content

Commit 5d5e88a

Browse files
ianfixesgitster
authored andcommitted
tutorial: use prompt with user names in example, to clarify who is doing what
Signed-off-by: Ian Katz <ifreecarve@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent dc6282d commit 5d5e88a

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Documentation/gittutorial.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ same machine, wants to contribute.
274274
Bob begins with:
275275

276276
------------------------------------------------
277-
$ git clone /home/alice/project myrepo
277+
bob$ git clone /home/alice/project myrepo
278278
------------------------------------------------
279279

280280
This creates a new directory "myrepo" containing a clone of Alice's
@@ -285,16 +285,16 @@ Bob then makes some changes and commits them:
285285

286286
------------------------------------------------
287287
(edit files)
288-
$ git commit -a
288+
bob$ git commit -a
289289
(repeat as necessary)
290290
------------------------------------------------
291291

292292
When he's ready, he tells Alice to pull changes from the repository
293293
at /home/bob/myrepo. She does this with:
294294

295295
------------------------------------------------
296-
$ cd /home/alice/project
297-
$ git pull /home/bob/myrepo master
296+
alice$ cd /home/alice/project
297+
alice$ git pull /home/bob/myrepo master
298298
------------------------------------------------
299299

300300
This merges the changes from Bob's "master" branch into Alice's
@@ -312,15 +312,15 @@ again. By defining 'remote' repository shorthand, you can make
312312
it easier:
313313

314314
------------------------------------------------
315-
$ git remote add bob /home/bob/myrepo
315+
alice$ git remote add bob /home/bob/myrepo
316316
------------------------------------------------
317317

318318
With this, Alice can perform the first operation alone using the
319319
'git-fetch' command without merging them with her own branch,
320320
using:
321321

322322
-------------------------------------
323-
$ git fetch bob
323+
alice$ git fetch bob
324324
-------------------------------------
325325

326326
Unlike the longhand form, when Alice fetches from Bob using a
@@ -329,7 +329,7 @@ fetched is stored in a remote tracking branch, in this case
329329
`bob/master`. So after this:
330330

331331
-------------------------------------
332-
$ git log -p master..bob/master
332+
alice$ git log -p master..bob/master
333333
-------------------------------------
334334

335335
shows a list of all the changes that Bob made since he branched from
@@ -339,14 +339,14 @@ After examining those changes, Alice
339339
could merge the changes into her master branch:
340340

341341
-------------------------------------
342-
$ git merge bob/master
342+
alice$ git merge bob/master
343343
-------------------------------------
344344

345345
This `merge` can also be done by 'pulling from her own remote
346346
tracking branch', like this:
347347

348348
-------------------------------------
349-
$ git pull . remotes/bob/master
349+
alice$ git pull . remotes/bob/master
350350
-------------------------------------
351351

352352
Note that git pull always merges into the current branch,
@@ -355,7 +355,7 @@ regardless of what else is given on the command line.
355355
Later, Bob can update his repo with Alice's latest changes using
356356

357357
-------------------------------------
358-
$ git pull
358+
bob$ git pull
359359
-------------------------------------
360360

361361
Note that he doesn't need to give the path to Alice's repository;
@@ -364,7 +364,7 @@ repository in the repository configuration, and that location is
364364
used for pulls:
365365

366366
-------------------------------------
367-
$ git config --get remote.origin.url
367+
bob$ git config --get remote.origin.url
368368
/home/alice/project
369369
-------------------------------------
370370

@@ -376,15 +376,15 @@ Git also keeps a pristine copy of Alice's master branch under the
376376
name "origin/master":
377377

378378
-------------------------------------
379-
$ git branch -r
379+
bob$ git branch -r
380380
origin/master
381381
-------------------------------------
382382

383383
If Bob later decides to work from a different host, he can still
384384
perform clones and pulls using the ssh protocol:
385385

386386
-------------------------------------
387-
$ git clone alice.org:/home/alice/project myrepo
387+
bob$ git clone alice.org:/home/alice/project myrepo
388388
-------------------------------------
389389

390390
Alternatively, git has a native protocol, or can use rsync or http;

0 commit comments

Comments
 (0)