Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions book/10-git-internals/sections/refspec.asc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Running the command above adds a section to your repository's `.git/config` file
fetch = +refs/heads/*:refs/remotes/origin/*
----

The format of the refspec is, first, an optional `+`, followed by `<src>:<dst>`, where `<src>` is the pattern for references on the remote side and `<dst>` is where those references will be tracked locally.
The `+` tells Git to update the reference even if it isn't a fast-forward.
The format of the refspec is, first, an optional `{plus}`, followed by `<src>:<dst>`, where `<src>` is the pattern for references on the remote side and `<dst>` is where those references will be tracked locally.
The `{plus}` tells Git to update the reference even if it isn't a fast-forward.

In the default case that is automatically written by a `git remote add origin` command, Git fetches all the references under `refs/heads/` on the server and writes them to `refs/remotes/origin/` locally.
So, if there is a `master` branch on the server, you can access the log of that branch locally via any of the following:
Expand Down