Symbolic ref names branches tags remote-tracking branches

suggest change
$ git log master    # specify branch
$ git show v1.0     # specify tag
$ git show HEAD     # specify current branch
$ git show origin   # specify default remote-tracking branch for remote 'origin'

A revision can be a symbolic ref: a branch (master, next), a tag (v1.0), a remote-tracking branch (origin/master), or HEAD. origin alone means that remote’s default branch (origin/HEAD).

If the symbolic ref name is ambiguous, for example if you have both branch and tag named ‘fix’ (having branch and tag with the same name is not recommended), you need to specify the kind of ref you want to use:

$ git show heads/fix      # or 'refs/heads/fix', to specify branch
$ git show tags/fix       # or 'refs/tags/fix', to specify tag

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents