On Mar 31, 11:31 pm, vfclists <vfcli...@googlemail.com> wrote:
> When I run 'git remote show origin' the output states that a git push/
> pull/fetch will fetch and push a number of branches on the remote.
> Is there a way to push only a particular branch and ignore the others?

Yes, see the git-config manual and search for the "push.default"

> The git branch docs show this example.
> ***
> Delete an unneeded branch
>     $ git clone git://git.kernel.org/.../git.git my.git
>     $ cd my.git
>     $ git branch -d -r origin/todo origin/html origin/man   (1)
> ***
> Does the 'git branch -d -r' option delete the local copies of the
> remote branches, or the remote copies?
> If I were to apply them without the origin prefix would it delete just
> the local ones?

"Yes" to both questions. Note that "origin" is not prefix, it's the
name of an actual directory under .git.
To get a better grasp of this topic, read the "SPECIFYING REVISIONS"
section of the git-rev-parse manual page.

Also I'd like to amend what Marek said: I noticed people get confused
by the convention used to delete objects in remote repositories
(that `git push remote_name :remote_object` thing).
The idea is that in the "full" form used for pushing rather than
deletion you use this command like this:
$ git push remote_name local_object:remote_object
and so for deletion you push "nothing" to a specific remote object.
Thinking this way possibly gives the "deletion" form of this command
more sense.

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-us...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to