Skip to content

Commit 421893a

Browse files
committed
Tweaks to "Working with Remotes"; em dashes, add NOTE defining "remote"
1 parent 2fb407f commit 421893a

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

book/02-git-basics/sections/remotes.asc

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,19 @@ Collaborating with others involves managing these remote repositories and pushin
88
Managing remote repositories includes knowing how to add remote repositories, remove remotes that are no longer valid, manage various remote branches and define them as being tracked or not, and more.
99
In this section, we'll cover some of these remote-management skills.
1010

11+
[NOTE]
12+
.Remote repositories can be on your local machine.
13+
====
14+
It is entirely possible that you can be working with a ``remote'' repository that is, in fact, on the same host you are.
15+
The word ``remote'' does not necessarily imply that the repository is somewhere else on the network or Internet, only that it is elsewhere.
16+
Working with such a remote repository would still involve all the standard pushing, pulling and fetching operations as with any other remote.
17+
====
18+
1119
==== Showing Your Remotes
1220

1321
To see which remote servers you have configured, you can run the `git remote` command.(((git commands, remote)))
1422
It lists the shortnames of each remote handle you've specified.
15-
If you've cloned your repository, you should at least see `origin` that is the default name Git gives to the server you cloned from:
23+
If you've cloned your repository, you should at least see `origin` -- that is the default name Git gives to the server you cloned from:
1624

1725
[source,console]
1826
----
@@ -94,7 +102,7 @@ From https://github.com/paulboone/ticgit
94102
* [new branch] ticgit -> pb/ticgit
95103
----
96104

97-
Paul's master branch is now accessible locally as `pb/master` you can merge it into one of your branches, or you can check out a local branch at that point if you want to inspect it.
105+
Paul's master branch is now accessible locally as `pb/master` -- you can merge it into one of your branches, or you can check out a local branch at that point if you want to inspect it.
98106
(We'll go over what branches are and how to use them in much more detail in <<_git_branching>>.)
99107

100108
[[_fetching_and_pulling]]
@@ -112,7 +120,7 @@ After you do this, you should have references to all the branches from that remo
112120

113121
If you clone a repository, the command automatically adds that remote repository under the name ``origin''.
114122
So, `git fetch origin` fetches any new work that has been pushed to that server since you cloned (or last fetched from) it.
115-
It's important to note that the `git fetch` command only downloads the data to your local repository it doesn't automatically merge it with any of your work or modify what you're currently working on.
123+
It's important to note that the `git fetch` command only downloads the data to your local repository -- it doesn't automatically merge it with any of your work or modify what you're currently working on.
116124
You have to merge it manually into your work when you're ready.
117125

118126
If your current branch is set up to track a remote branch (see the next section and <<_git_branching>> for more information), you can use the `git pull` command to automatically fetch and then merge that remote branch into your current branch.(((git commands, pull)))
@@ -208,7 +216,7 @@ paul
208216
It's worth mentioning that this changes all your remote-tracking branch names, too.
209217
What used to be referenced at `pb/master` is now at `paul/master`.
210218

211-
If you want to remove a remote for some reason you've moved the server or are no longer using a particular mirror, or perhaps a contributor isn't contributing anymore you can either use `git remote remove` or `git remote rm`:
219+
If you want to remove a remote for some reason -- you've moved the server or are no longer using a particular mirror, or perhaps a contributor isn't contributing anymore -- you can either use `git remote remove` or `git remote rm`:
212220

213221
[source,console]
214222
----

0 commit comments

Comments
 (0)